|I am new to batch scripting and wondering how can I rename files after coping them to a folder with a last date at the end of the filename. |
Currently my batch file looks for all the PDFs which contain (ABCD) in their filename under a directory (C:\Folder1) and then copies them to a folder called (C:\Folder1\ABCD) which works fine:
for %%a in (ABCD) do (
copy "*%%a*.PDF" "%%a"
The source directory (C:\Folder1) is updated every Friday and then after coping files to the ABCD folder using my batch file, the filenames should be followed by the date of every last Monday. Let say today is Friday (2012-06-22) and the date (2012-06-18) should be added at the end of each file.
Would be grateful if someone can help me.