6 replies
by opatzg9
by opatzg9
Try something like this:
filecrlf.txt is a file with a carriage return linefeed
Batch file
date>newname.txt |filecrlf.txt
or
type filecrlf.txt|date>newname.txt
then
copy filename @newname.txt
Which should use it as a list command, just a list of 1
Good luck, still think it can be made a lot cleaner with a compiled program even if it shells out the copy command.
by mk1
SET TDATE=%DATE%
XCOPY R:\img\%TDATE%\*.* H:\IMG\%TDATE%\
The "DATE" command returns the current system date. A variable is denoted in the batch file by surrounding the variable name with the %
In my example I have a vaiable called "TDATE" which I set to the system date. I then reference that variable and make its value part of my filenmae path by including it in the path surounded by % signs.
So if my system date was set to WED 12/04/2002 then the xcopy command executed above would actually be:
XCOPY R:\img\WED 12/04/2002 \*.* H:\IMG\WED 12/04/2002 \
by mk1
by mk1
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending