I have some files I need to copy off a server but want to retain the creation date. copy somefile.txt somefile%date:~10,4%%date:~7,2%%date:~4,2%.txt Will put todays date on the filename.
IS there a way to append the file date in the name on a copy or rename?

Maybe wording similar to this.
copy file off server with timestamp
http://www.google.com.au/search?hl=en&q=copy+file+off+server+with+timestamp&btnG=Search&meta=
Try this: ::== keepdat7.bat
:: stamp file with date before copy to keep orig date
:: file date layout is 04-05-06 05:52@echo off
for /f "tokens=*" %%F in ('dir /b/a-d') do call :sub1 %%F
goto :eof:sub1
set stamp=%~t1
set stamp=%stamp:~0,11%%stamp:~12,2%
echo copy %1 %~n1 %stamp%%~x1%
goto :eof
:: DONEYou may want to tinker with it and get the spaces out of the filenames. I certainly would. I don't need no steenking spaces.
If at first you don't succeed, you're about average.M2
I guess I should have clarified. I am wanting to append the file date to the file name on copy or rename or move.. I found this in the batch parameters help.
%~t1 Expands %1 to date and time of file.
I just don't know how to use it with the xcopy command.
Thanks
Thanks Mechanix2Go
That was exactly what I was looking for
