1.

Solve : ad 7 days to a current date?

Answer»

Does anyone know how to do, under winxp, add 7 days to a current date. For example:
Code: [Select]>>c:/windows/WHsced.bat ECHO AT 20:30 /EVERY:[b]10[/b],31 c:/windows/WHmain.batI'd like that the 10 (see bald) in the code would be replaced by a week later then the current date. For example, now DOS would look the date, in my country we're the 2nd of the month on the MOMENT of writing, so then DOS would say:

Code: [Select]>>c:/windows/WHsced.bat ECHO AT 20:30 /EVERY:[b]9[/b],31 c:/windows/WHmain.bat
Because 2+7=9


And if we are the tirth tomorrow, etc

Does anyone has an idea?Quote


Does anyone know how to do, under winxp,

- - -

Does anyone has an idea?


Since I don't have XP, I can't experiment with its scripting. So I can't tell you how to do it with only the COMMAND line of XP.

You'll probably get an answer here soon from someone that can. I've seen a few members post here that appear to be very good with it.

If however you don't get an answer soon, let me know. I can do it, under XP, but using a FREE utility program to manipulate the date, do the MATH, and set an environment variable(s), that you can then do with whatever you want. The method and batch files should work under XP just the same as they do under 98, etc.



blackberry,

Try this:
[edit]@echo off
CALL:jdate jd "%date%"
SET /a jd+=10
CALL:jdate2date jd y m d
echo.file.%m%/%d%/%y%
pause
GOTO:EOF

:jdate
...
:jdate2date
...[/edit]

Get the :jdate function from here http://www.dostips.com/DtCodeCmdLib.php#jdate
Get the :jdate2date function from here http://www.dostips.com/DtCodeCmdLib.php#jdate2date

DOS IT HELP?


Discussion

No Comment Found