@echo off
For /f "tokens=1-3 delims=/ " %a in ('date /t') do (set from=E:\%a%b%c.txt)
For /f "tokens=1-3 delims=/ " %a in ('date /t') do (set to=E:\%a%b%c_1.txt)
copy %from% %to%
if I copy above code on a COMMAND window (on Windows 7) then it can run successfully. But if I save them in a bat file and run the .bat from COMMAND window, it fails, it said '這時候不應有 \bc.txt'.
I just have no idea about how it failed, just only put them on a .bat file.
Thanks...