I am trying to create a task in the Task Scheduler that will automatically move some pdf files into another folder that is based on the date in the pdf files which is for the previous month. The problem I am having is that I can't figure out how to get the command line to roll back to the previous month. I am using the same thing to create the folder to begin with, but the task is set to run at the end of what would be considered the previous month. So for example one task running in October to create the folder for current month 2010-10 and another run in November after the PDFs are compiled that will move them to the 2010-10 folder. Any ideas?
The date parameters I am using are "%DATE:~0,2%" I have tried "%DATE:~0,2% -1" and "%DATE:~0,2%-1" and the full text in the batch file is "move [-Y] *.pdf P:\CBO\Physician Monthly Reports\%DATE:~6,4%-%DATE:~0,2% -1"
at
command, but Windows does. DOS is an operating system that is different from Windows, and that is incapable of scheduling a task for later running. Windows's command line is still Windows, not DOS.