Hi,
Let me tell you what i want to make so that all you can have a basic idea why i need to make this kind of file.
I m in a BPO sector (System Administrator) we daily gets .zip files to provide work to our operators as they finishes the work the output of the work is automatically generated by internal software to a different location where at that location we are having folders by the name of dates only (MMDDYYYY <-- only) which we need to copy to another location on network need to zip it and have to upload it to remote site. This is all a manual work. So i would like to make a windows batch file which will ask me to enter date in MMDDYYYY format and after providing the the date it will automatically copy the specified folder to the destination location. I googled something but found out this thing which is i think just asking a date only and providing the output in different formats ::== runtoday.bat @echo off setLocal EnableDelayedExpansion set /p refDATE=enter date to compare in format: YYYYMMDD call :now if !refDATE! lss !today! echo don't run if !refDATE! geq !today! echo run goto :eof :now :: use debug/BIOS to get DATE into vars ::== @echo off > d.d
>> d.d echo E 0100 B4 2A CD 21 B4 4C CD 21
>> d.d echo N DAY.COM
>> d.d echo RCX
>> d.d echo 8
>> d.d echo W
>> d.d echo E 0100 B4 2A CD 21 88 F0 B4 4C CD 21
>> d.d echo N MONTH.COM
>> d.d echo RCX
>> d.d echo A
>> d.d echo W
>> d.d echo E 0100 B4 2A CD 21 89 C8 B4 4C CD 21
>> d.d echo N YEAR.COM
>> d.d echo RCX
>> d.d echo A
>> d.d echo W
>> d.d echo E 0100 B4 2A CD 21 88 D0 B4 4C CD 21
>> d.d echo N DAT.COM
>> d.d echo RCX
>> d.d echo A
>> d.d echo W
>> d.d echo Q
debug < d.d > nul
del d.d
dat
for %%a in (1 2 3 4 5 6 7 8 9 ) do if errorlevel %%a set dat=0%%a
for %%a in ( 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31) do if errorlevel %%a set dat=%%a
echo Date %dat%
day
if errorlevel 0 set day=Sunday
if errorlevel 1 set day=Monday
if errorlevel 2 set day=Tuesday
if errorlevel 3 set day=Wednesday
if errorlevel 4 set day=Thursday
if errorlevel 5 set day=Friday
if errorlevel 6 set day=Saturday
echo Day %day%
month
for %%a in (1 2 3 4 5 6 7 8 9 ) do if errorlevel %%a set month=0%%a
for %%a in ( 10 11 12) do if errorlevel %%a set month=%%a
echo Month %month%
year
if errorlevel 215 set Year=2007
if errorlevel 216 set Year=2008
if errorlevel 217 set Year=2009
if errorlevel 218 set Year=2010
echo Year %Year%
set today=%year%%month%%dat%
echo Today is %today%
for %%c in (day month year dat) do del %%c.com
::== done
so requesting you to solve my this kind of requirements..
thanks…
Ketan Aagja