Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Renaming file to a variable value
Name: Michael Tham Date: May 25, 2003 at 22:50:54 Pacific OS: Win NT CPU/Ram: Intel/256M
Comment:
Hi,
I would like to rename a file (which is copied from another location) to have the current date reflected in the filename. Please refer to below..
------------- @echo off for /F "tokens=2-4 delims=/- " %%A in ('date/T') do set DATE=%%C%%A%%B set DATE=%DATE:~2% XCOPY \\sgsinjde05\c$\temp\r55410~1.csv e:\test /Z REN e:\batch\r55410~1.csv "%DATE%".csv -------------
I got the last line wrong, 'cos I'm not sure how to do it, please help.
Summary: Hi. What I'm trying to do is to append the number of lines from a file to a variable. The file's lines would have only one character (and always the same character: "]"). Just that. ie: ::txt.txt ] ]...
Summary: Hi! I want to copy a file from a server to the desktop. Trouble is i want to do it for lots of ppl so i set a variable using USERNAME so it looks something like: Can't do backslashes so the'll be repr...