The syntax of the command is incorrect.

January 21, 2011 at 20:49:11
Specs: Windows XP
C:\>rename test.txt test%date:4,2%-%date:7,2%-%date:10%.txt
The syntax of the command is incorrect.

Why


See More: The syntax of the command is incorrect.

Report •


#1
January 21, 2011 at 21:09:59
This should be in the programming forum....

[1] You can't really trust substrings on the date variable, it is reliant on user settings.

[2] You must add a tilde ("~") after the colon (":") for substrings.

echo rename test.txt test%date:~4,2%-%date:~7,2%-%date:~10%.txt


Report •
Related Solutions


Ask Question