Reputation: 21
So here is what I have
:a
IF EXIST D:\ (
goto copy
) ELSE (
goto wait
)
:wait
timeout /t 300
goto a
:copy
xcopy "D:\photos" "C:\Photos From Cam"
exit
but I'm not very fond of this becuase that means it is always looping, except for the 5 minute pause, and I would like a way to do this where it doesnt run any code until it detects the files. Is this possible?
Upvotes: 2
Views: 68
Reputation: 202222
I do not think there's a better solution using just shell, than the one you already have.
You would have to use some external tools
For example refer to question Windows: File Monitoring Script (Batch/VBS).
Upvotes: 1