Saved Bookmarks
| 1. |
Solve : batch file find by date? |
|
Answer» I see a bat file that returns a date.... I see a bat file that returns a date The format of the date will determine how to write the batch code. This snippet is designed for DOW mm/dd/yyyy Code: [Select]echo off set dow=%date:~0,3% set dowf=weekend if %dow%==Mon set dowf=Monday if %dow%==Tue set dowf=Tuesday if %dow%==Wed set dowf=Wednesday if %dow%==Thu set dowf=Thursday if %dow%==Fri set dowf=Friday if exist c:\banner\%dowf%\file copy /y file c:\banner\%dowf%\file You'll need to change any references to file. Good luck. Bad luck if your local settings don't use US date format! (There are a few billion people who don't.) My European locale just has a date like this 03/08/2008. No day of the week string. |
|