Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to detect a new file exists
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00893528
Message ID:
00893532
Views:
18
Jim,
exactly what I am trying to do. Right now .NET is not an option for us as we are in the middle of a very complex project. I guess I will stay with the adir() for a while. Thanks for the input.

John.


>John,
>
>I worked on something similar to this in VFP a couple of years back, and the best solution I could come up with was timer based. In my solution, files were being sent via FTP, so the file would be detected before it was entirely there. This required additional logic to keep scanning the file size growth until it stabilized.
>
>I have recently done another project in which I wrote a .NET Windows Service using the System.IO.FileSystemWatcher class to provide the plumbing of scanning a folder for new files. So far, this has been a bulletproof solution. I am in the process of writing a VFP com object to be used by this service to provide further processing of data when it's detected by the FileSystemWatcher.
>
>If .NET is an option, I would highly reccomend this as a solution to your issue.
>
>regards,
>
>JE
>
>>I am running a VFP process on a server where other computers can remotly send a file to a given directory. I need to be able to respond quickly when the file has been sent. The file could be any name and size. I could set a timer to check every second or so that would run an adir() process to detect new files but that would mean that I would be constantly banging away at it. Is there any other way that would not take up as much server resources?
>>TIA
>>John.
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Previous
Reply
Map
View

Click here to load this message in the networking platform