A question about automatic renaming in a batch file?
Under the DOS mode of win2000svser, executing the a.bat batch command file should automatically rename the original file "temp.txt" to current date + temp.txt (that is, a file named: "2005-03-04temp.txt"
. Note that the current date should be the system's automatic date for that day. I'm asking how to write the batch commands in a.bat. Thanks in advance to all the experts for your guidance!
The statement below works in win2000, but unfortunately it doesn't work under server, because %date% returns "Friday 2005-03-04", and because of the space it says it's invalid, boo.... how can I extract it and solve this, urgent urgent urgent.....
echo ren test.txt %date%test.txt >temp.bat
Under the DOS mode of win2000svser, executing the a.bat batch command file should automatically rename the original file "temp.txt" to current date + temp.txt (that is, a file named: "2005-03-04temp.txt"
. Note that the current date should be the system's automatic date for that day. I'm asking how to write the batch commands in a.bat. Thanks in advance to all the experts for your guidance!The statement below works in win2000, but unfortunately it doesn't work under server, because %date% returns "Friday 2005-03-04", and because of the space it says it's invalid, boo.... how can I extract it and solve this, urgent urgent urgent.....
echo ren test.txt %date%test.txt >temp.bat


