Re: [U2] Counting the number of files in a directory

2004-06-23 Thread FFT2001
In a message dated 6/23/2004 1:58:20 AM Pacific Daylight Time, [EMAIL PROTECTED] writes: 0005: FILE.2.FIND = 'EDI.TXT' 0006: EXECUTE 'DOS /C DIR /B C:\' CAPTURING X RETURNING Y 0007: ITS.THERE = (INDEX(X, FILE.2.FIND, 1) 0) This looks like an old way to do it. Perhaps

RE: [U2] Counting the number of files in a directory

2004-06-23 Thread Ken Wallis
There really have been a whole heap of complicated solutions offered to this. I'm glad you have something working, but I'll just suggest the simplest, most efficient way to tell if an OS pathname exists in UniData is this: IF DIR(PATHNAME) THEN * exists END ELSE * doesn't END Since you don't

Re: [U2] Counting the number of files in a directory

2004-06-22 Thread FFT2001
In a message dated 6/22/2004 8:47:20 AM Pacific Daylight Time, [EMAIL PROTECTED] writes: I can handle running the 2 functions and scheduling the program to run every 30 seconds or so, but I'm not quite sure how to poll the directory. The directory is D:\Roi\PLACON.MAIN\INBOUND.EDI and

RE: [U2] Counting the number of files in a directory

2004-06-22 Thread Brian Phillips
D:\...? Sounds like Windows. FWIW in Universe, (HP/UX) I'd do: open '','INBOUND.EDI' to F.INBOUND else... loop readv dummy from F.INBOUND, EDI.TXT, 0 then exists = 1 else exists = 0 if exists then... sleep 30 repeat (assuming you have defined INBOUND.EDI in the VOC pointing to

RE: [U2] Counting the number of files in a directory

2004-06-22 Thread jasonp
That got me on the right track, thanks. I don't know about other U2 systems, but UniData required DIR instead of F in the first line of the VOC entry. Everything else was the same though. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 22, 2004