The batch file will be running in command prompt in Windows 2000
server.
Then news:alt.msdos.batch.nt is the more appropriate group.
This is an faq, with lots of variants posted. Search google
http://groups.google.com/advanced_group_search?group=alt.msdos.batch.nt
Hereis one:
@echo off
if [%1]==[] goto :eof
if not EXIST %1 goto :eof
set mydate=%date:/=%
ren "%~f1" "%~n1-%mydate%.%~x1"
--
Greetings
Matthias
That is the by far the most frequently asked batch programming
question. It is covered in
243153 Dec 27 2003 ftp://garbo.uwasa.fi/pc/link/tsbat.zip
tsbat.zip Useful MS-DOS batch files and tricks, T.Salmi
Last answered only a couple of days ago. (Well, FAQs _are_
frequently asked, right?)
> The batch file will be running in command prompt in Windows 2000
> server.
In that case you'll want news:alt.msdos.batch.nt and
73123 Feb 2 2004 ftp://garbo.uwasa.fi/pc/link/tscmd.zip
tscmd.zip Useful NT/2000/XP script tricks and tips, T.Salmi
All the best, Timo
--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance ; University of Vaasa
mailto:t...@uwasa.fi <http://www.uwasa.fi/~ts/> ; FIN-65101, Finland
Timo's FAQ materials at http://www.uwasa.fi/~ts/http/tsfaq.html
*** You need a "rename" batch file, not a "copy" one. Try
"DATEFILE.bat" at:
www.chebucto.ns.ca/ak621/DOS/Bat-Adv2.bat
Richard Bonner
http://www.chebucto.ns.ca/~ak621/DOS/