I'm just wondering. Is it possible for task scheduler to detect a file? The closest thing I found to this question was on Technet. Could anyone give me any pointers? Thanks.
Asked
Active
Viewed 2,555 times
2
-
What is "task scheduler to detect a file"? Please explain. – harrymc Mar 17 '21 at 19:02
-
@harrymc That means that if a file exists in the directory that task scheduler is pointed to, something will happen. – NewUser Mar 17 '21 at 19:15
-
No.. you can fire up a task and see if it is there.. or you can run a process (all of the time) that watches for the file to arrive. – Señor CMasMas Mar 17 '21 at 19:23
-
1The question I have would be how quickly do you need to know the file exists? Can you poll for it or do you need to know straight away? Google filesystemwatcher.if you need to know straight away. – HelpingHand Mar 17 '21 at 20:08
1 Answers
0
You may shedule to run a batch (.bat) that may contain such code:
if exist <insert file name here> (
rem file exists
) else (
rem file doesn't exist
)
Or in a single line for a single action:
if exist <insert file name here> <action>
For more information and examples see the IF command.
harrymc
- 480,290