I need use batch file to add date to all files name in a folder. Now the problem is that my batch can only add the date to the file with the single word in the file name. Such as if the file name is "report.xls" then could change to report1 October 2011.xls. But if the file name has more than one word, it doesn't work. Such as "report for monthly summary.xls", and all my files have names like that. Can batch file do something like that? Thank you for any suggestions/helps!!
here is my code, I have made it as simple as possible:
@For %%a in ("*.xls") do (
copy %%a "%%~na %All%.xls"