Hi Al, Are you getting a Unidata error message? If so, which one?
There's the UniBasic "DIR" function and the Windows-level "dir" command, which work quite differently. The UniBasic "DIR" function works file-by-file, so it expects you to specify the full path to _HOLD_ and the hold file name. Simon from tcosoftware posted this great code snippet on July 29th: > For a Unidata specific version of this use FILEINFO() and DIR() ie: > OPEN "_HOLD_" TO fp ELSE xxx > FILE.PATH=FILEINFO(fp,2):"/":HOLD.ITEM ;* forward slash is OK on NT > DATE.MODIFIED=DIR(FILE.PATH)<2> I just got Simon's example to work beautifully with _HOLD_ on UD 5.1 on Unix. Although his comment says "the forward slash is OK on NT", you may need to change the forward slash in the "FILE.PATH=" line to a backslash "\". Otherwise, I'll bet you'll have both kinds of slashes in your full path, which might give indigestion to the DIR function. >From TCL, "HELP DIR" has more info and another helpful example. I think Wendy's referring to the Windows-level "dir" command, which you could use to retrieve the file names of all the hold entries in _HOLD_. Again, you'll need to specify the full path which is returned by the FILEINFO( ) function, or find it in attribute 2 of VOC _HOLD_. >From a Windows command prompt, "dir /? | more" will describe all the options. Hope this helps, Tom >>> [EMAIL PROTECTED] 08/23/04 7:23 PM >>> >> Al DeWitt >> [How to find] the Date Modified of a W2K UniData file. Folks responded to use the >> DIR command. It worked great except it won't work for files in the _HOLD_ folder. >> <snip> > I don't recall the original thread so I may be off base, but if you're > just looking for the last modified file within _HOLD_, you can use > switches with DIR to sort the files. > DIR /OD will give you all the files in date order, oldest first. Look > at the date of the last file listed, and that's the equivalent of when > the _HOLD_ "file" was modified. > HELP DIR for more info, you can reverse the order, for example. ----------------------------------------- This e-mail and any attachments may contain CONFIDENTIAL information, including PROTECTED HEALTH INFORMATION. If you are not the intended recipient, any use or disclosure of this information is STRICTLY PROHIBITED; you are requested to delete this e-mail and any attachments, notify the sender immediately, and notify the LabCorp Privacy Officer at [EMAIL PROTECTED] or call (877) 23-HIPAA / (877) 234-4722. ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/
