Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.
Directory d--------Readonly -r-------Archive --a------Hidden ---h-----System ----s----Compressed -----c---Offline ------o--Temporary -------t-Reparse_Point --------l
@OP, ignore bill as he is trolling. Follow Salmon's method and you should be fine
What is delfile?
don't use spaces in SET statements.
set variable =value ^ | ^ This space is an error; %variable% will be empty set variable= value ^ | ^ This space is allowed; it results in the string held in %variable% having a leading space
if %fattr:~2,1% == a goto :end
if "%fattr:~2,1%"=="a" goto :end
if %mm% GTR 01
if %mm% GTR 01 set /a jd1=%jd1%+31
I am creating two dates in the format yyyyddd. I start by taking the year and multiplying by 1000
@echo offREM Create VBscriptecho wsh.echo Year(wscript.arguments(0))^&DatePart("y", wscript.arguments(0))>Daynumber.vbsREM now you can use it in your script as many times as you wantset querydate1=20/11/2009REM pass the date to the VBscript & get back the resultfor /f "delims==" %%D in ('cscript //nologo Daynumber.vbs %querydate1%') do set Daynumber1=%%Dset querydate2=20/03/2009for /f "delims==" %%D in ('cscript //nologo Daynumber.vbs %querydate2%') do set Daynumber2=%%Decho The day number of %querydate1% is %Daynumber1%echo The day number of %querydate2% is %Daynumber2%
The day number of 20/11/2009 is 2009324The day number of 20/03/2009 is 200979