• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 52
  • Last Modified:

Auto Scan directory/folder

On a Windows 2008 sever, how can I check for  the existence of a file in a folder continuously?  Is there a command in the OS to do this or is there a standalone tool that will do this for me?

I basically what to create a process to continuously scan a folder; when a file is place in this folder the process will automatically execute a script to ftp the file.

Any help would be Awesome!

Thank you.
  • 2
1 Solution
You could write a batch file to perform this function however I caution that the existence of the file is not a good method to use to start the send.  All the data may not be there as soon as the file name is visible.  

ericmageeAuthor Commented:
@ pony10us.  Point taken. I will be sure to add an sleep or pause before transmission.

When writing the batch file, How can I ensure the process is running continuously in memory?  In addition, what command would allow me to auto scan a folder/directory?

Thank you.
"How can I ensure the process is running continuously in memory?"  Place it in the startup and the loop will keep it running unless someone ends the process through task manager.

"what command would allow me to auto scan a folder/directory?" I would use an IF EXIST loop

Should give you an idea to start with:


IF EXIST C:<some file> CALL <ftp program>

GOTO start

You may want to search for a way to run it with out the window.  You can run it minimized or there are VBS and tools that will let it run invisible which should work for this function since it won't require human intervention.
Here is a sample Robo-FTP script that will do exactly what you asked: http://kb.robo-ftp.com/script_library/show/37

You can install Robo-FTP scripts to run as a Windows Service so it will be running all the time and be automatically restarted by the operating system if the computer reboots.

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now