"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
"D:\Roi\PLACON.MAIN\INBOUND.EDI")
Or,
loop
cmd = "sh -c 'find D:\Roi\PLACON.MAIN\INBOUND.EDI\ -name EDI.TXT -print |
wc | awk '{ print $1 }'"
execute cmd capturing tmp
if tmp then...
sleep 30
repeat
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of
> [EMAIL PROTECTED]
> Sent: Tuesday, June 22, 2004 11:39 AM
> To: [EMAIL PROTECTED]
> Subject: [U2] Counting the number of files in a directory
>
>
> I'm trying to automate a couple of functions in my ERP system and
> I need a little help. Ok, maybe a lot of help. Here's the
> situation... Our ERP system has some basic EDI functionality.
> Unfortunately, it's completely user-driven. What I want to do is
> create a UniData program to poll a directory and, if any files
> exist, run the 2 functions required to pull those transactions
> in. 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 the file I want to check for
> is EDI.TXT and return a true/false (1/0) to decide whether to
> continue processing. Can anyone give me an example of this?
> Thanks in advance.
> -------
> u2-users mailing list
> [EMAIL PROTECTED]
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/