An even better way to handle this is to start developing in .Net. You can handle this situation with the FileSystemWatcher class. This class allows you to monitor a folder for other folders, files of any type and file situations. For instance it can act on a file if it is created, deleted or changed. This class runs on it's own thread so it virtually unnoticeable when running.
This one of many, many improvements in .Net. It is well worth taking the time to make the jump. .Net makes even a mediocre programmer like me capable of solving this type of problem easily. >>> On 7/6/2007 at 1:55 pm, in message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > 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]
