On Tue, 8 Jul 2003 09:23:32 -0700, "Ketaki" <(E-Mail Removed)>
wrote:
>I have presently written a batchfile as follows:
>
>for /f "tokens=2" %%i in ('date /t') do set thedate=%%i
>rename c:\abc.txt %thedate:~0,2%-%thedate:~3,2%-%
>thedate:~6,4%-abc.txt
>
>This appends today's date into the filename. But how can i
>obtain yesterday's date instead?
Take a look at the following thread for a variety of methods.
http://groups.google.com/groups?q=dd%3D5546+batch.nt
Or you can use Conset (
http://home.pe.net/~fpw/freeware/)
Conset /date d-1
echo Yesterday was %date%
Garry