Search found 4 matches

by marimo
15 Sep 2009 14:11
Forum: DOS Batch Forum
Topic: dos yesterday's date
Replies: 2
Views: 8498

dos yesterday's date

I know how to return current date like below.


set year=%date:~10,4%
set month=%date:~4,2%
set day=%date:~7,2%

echo %month%-%day%-%year%


but now I need to return yesterday's date. is it possible?
by marimo
06 Aug 2009 12:48
Forum: DOS Batch Forum
Topic: how to manipulate the file names
Replies: 6
Views: 8708

excellent!
by marimo
05 Aug 2009 14:17
Forum: DOS Batch Forum
Topic: how to manipulate the file names
Replies: 6
Views: 8708

just a little change.. My user came back to me and said they want to rename the master file to "Master_mm_yyyy.xls" I changed the syntax a little and works now. for /f "tokens=2,3 delims=_." %%a in ('dir "%folder%\master_*"') do set "date=%%~a_%%~b" Except mas...
by marimo
05 Aug 2009 12:40
Forum: DOS Batch Forum
Topic: how to manipulate the file names
Replies: 6
Views: 8708

how to manipulate the file names

Hi, I have some files in the directory "A". a.txt b.txt c.txt d.txt z.txt master_yyyymmdd.txt I want to move the files (a,b,c,d,z) to the directory "History" based on master_yyyymmdd file. for example, after the move, the files will be a_20090804.txt , b_20090804.txt, c_20090804....