Need something that will detect when a file has been created in a folder.

Is there a script or something that can be placed in a folder that would run or detect when a file has been added to the same folder? I need to establish a VPN to another computer and send a file into a specific folder. When that file is created I need a program to run automatically and then delete the newly created file. Is this possible?
Bryan_123Asked:
Who is Participating?
 
NetworkArchitekCommented:
Yes, you can use the FileWatcher class in .NET. This one is for VB. I'm assuming you intend to write a program to do this ...

http://www.developerfusion.com/show/3636/2/
0
 
NetworkArchitekCommented:
If I am not mistaken that is a library for Apple programmers, is it not?
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
brettmjohnsonCommented:
Yes, it is an Apple Carbon API.  However Bryan_123 did not specify for which OS he needs a solution.
0
 
NetworkArchitekCommented:
True. =)
0
 
Julian HansenCommented:
You might want to also take a look at the

ReadDirectoryChangesW
FindFirstChangeNotification
FindNextChangeNotification

API Functions - these allow you to monitor a folder for changes and have your code called whenever a change takes place.

0
 
Bryan_123Author Commented:
Sorry, I forgot to specify the OS. It's Microsoft Windows Server 2003 Standard Edition.
0
 
Julian HansenCommented:
Do you want to write something to do this or use an existing utility.

Code shouldn't be too difficult. I have some lying around from a utility I wrote to monitor an incomming fax folder. The application moves new faxes to a new location when they arrive. It could easily be adapted to what you want.

Let me know if you are interested.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.