Thread replies: 4
Thread images: 2
Anonymous
Bypassing Variables and errors in CMD
2016-06-27 16:09:09 Post No. 55285170
[Report]
Image search:
[Google]
Bypassing Variables and errors in CMD
Anonymous
2016-06-27 16:09:09
Post No. 55285170
[Report]
Trying to copy a file with a batch im writing.
Everything worked up until now, where i put
xcopy tempFile.txt "%date%-%time%.txt"
It specifies it as a file, but i always get
Invalid path
0 File(s) copied
Why wont windows let me assign a variable from the console (ie %time% and %date%) to a filename?
If i change the output to
xcopy tempFile.txt "SomeBlandFileName.txt"
it works fine, but thats not what i want.
Any help /g/?
Pic not related