A straightforward way to handle this is to put the VBA Dir function in a
loop, as in
Do
File = Dir(path) 'path is something like
"C:\directory\File*.dat"
If File <> "" Then
Process(File) 'File will be something like "File06052007.dat"
Kill "C:\directory\" & File 'don't process it twice
End If
Wait 'pauses for .5 seconds so the PC doesn't overload
Loop
Check out VBA's Help for more information on the Dir Function.
Rich McNeil
Boston Software Systems
866 653 5105 x 813
www.bostonworkstation.com
See us at MUSE booth 318
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andrew Koehler
Sent: Friday, July 06, 2007 2:51 PM
To: [email protected]
Subject: [Talk] Watch directory
Does anyone know of or have an example of a simple way to have BWS watch a
directory for a certain file and according to what file is dropped in the
directory a script is ran?
Thanks
Andrew
[EMAIL PROTECTED]