I have directory that is continuously being updated with pdf files. The file names look like this:
0001_2014_02_14_000000001_018_001_000.pdf
0001_2014_02_14_000000002_018_002_000.pdf
0001_2014_02_15_000000003_018_001_000.pdf
0001_2014_02_15_000000004_018_002_000.pdf
How would I create a batch file that will parse the date (character place 6) and move the files to a directory called d:\send
. To make it more complex I need to subtract 3 days from today's date and only move those files. BTW the modified date of the files won't work. The correct date is the date in the file name.
example:
today is 2/21/2014
find the files that have a prefix of 0001_2014_02_18_??????????.pdf
and send them to d:\send
Of course today's date will change daily and this will be scheduled to run everyday.
Thanks for your help.