A batch that monitor a shared drive

May 30, 2012 at 07:15:25
Specs: Windows 7, 4Gb
In the windows 7, I need to have a batch file that regularly monitors a shared drive, when i received a file with the extension doc/txt/csv/xls i move it to a backup directory or if it was a bat file it executed this file. After do that the batch reinitialize and wait for the next file

how to create a batch that in each 5 minutes valid if there is new files, if there is moved them to a backup directoru or executed them if it was a batch file ?

Thanks in advance

See More: A batch that monitor a shared drive

Report •

June 7, 2012 at 07:03:29

perhaps the format within the batch file, and then a schedualed task.

if exist c:\folder\*.txt copy c:\folder\*.txt d:\backup\
::end of bat
schtasks /create /sc minute /mo 5 /tn "autobackup" /tr \\backup.bat

seems like this might bog down the system if they are big files though

:: mike

Report •
Related Solutions

Ask Question