[cvsnt] DOS

Paul Russell paul_newsgroups at yahoo.ca
Fri Jun 6 00:53:03 BST 2003


In Windows 2000 DOS [cmd.exe] not [command.com], 
%date% gives "Fri 2003-06-06", so
____________
rem Get Second Part of date
for %%f in (%date%) do set YYYY-MM-DD=%%f
echo YYYY-MM-DD = [%YYYY-MM-DD%]
set FILE=filename%YYYY-MM-DD%
echo FILE = [%FILE%]
____________or
rem Get Second Part of date
for %%f in (%date%) do set YYYY-MM-DD=%%f
rename filename filename%YYYY-MM-DD%
____________
Note: Different DOS == Maybe Different Results
 
YYYY-MM-DD is nice since it will sort alphabetically==chronologically
(not like the English and American ways with Year Last).
 
Paul R.


Mac <pragcvs at yahoo.com> wrote:
Hi everybody,
This question not much cvs related. I created a back up copy for cvs repos and ftp that copy from NT machine using .bat file. However, I need to concatenate the sysdate to the file name so it won't be overwritten when I import the next back up copy.
Anyone know how to rename the file in the .bat file and attache the sysdate to it.
For example:
....
rename cvsbkup cvsbkup_sysdate
Thanks.


---------------------------------
Do you Yahoo!?
Free online calendar with sync to Outlook(TM).
_______________________________________________
cvsnt mailing list
cvsnt at cvsnt.org
http://www.cvsnt.org/cgi-bin/mailman/listinfo/cvsnt



---------------------------------
Post your free ad now! Yahoo! Canada Personals


More information about the cvsnt mailing list