PC Review Forums Newsgroups Windows 2000 Microsoft Windows 2000 CMD Promt Re: append yesterday's in txt filenames

Reply

Re: append yesterday's in txt filenames

 
Thread Tools Rate Thread
Old 09-07-2003, 04:06 AM   #1
Garry Deane
Guest
 
Posts: n/a
Default Re: append yesterday's in txt filenames


On Tue, 8 Jul 2003 09:23:32 -0700, "Ketaki" <ketakig@hotmail.com>
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

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off