|Well to help you further you will need to tell me a little bit about what you are doing and what problem you are trying to solve. I tried the code inside of a batch file and it worked for me. Granted I setup a Shortcut that ran the following...|
"C:\Users\myname\Desktop\New Folder\test4.bat" c:\ c:\test\
in the taget of my shortcut. I called my batch file test4.bat and made a test folder on my c: then ran it and it worked. This program will only work if the destination folder exists. If you want to make the destination folder then use the following code...
If exist %2 goto End
For /F "tokens=1,2 delims=." %%A in ('DIR %1*.txt /b') do (
copy "%1%%A.%%B" "%2%%A%Month%-%Day%-%Year%.%%B")
Got to remember every thing we provide is sample code typed off the tops of our heads. It is to help you get unstuck and assumes you know about batch file programming.
If you want to learn batch file scripting please go here...