Saturday, November 26, 2016

Opening a file from Task Scheduler

Some might think that to open a file (e.g. a plain text document) from Task Scheduler, you need some sort of script to use Windows's "open this document with whatever it needs" mode. Interestingly enough, you don't - and since you don't have to, you don't have to see the flash of a command prompt or whatever you use to launch the final thing. Instead, you can just put the full path to the target document as the "program" in a "start a program" action and sure enough, when the task is run, up will pop that document in its default application. (Caveat: Task Scheduler doesn't seem to like spaces in the path, even if you quote it.)

No comments:

Post a Comment