Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi, guys... I have a certain problem, but to be more inlighting i will post my code and explain the problem beyond.
C:\CLmailer\CLmailer /server:smtp.myserver.gr /to:reciever@recieve.gr /from:sender@send.gr /subject:"my subject %date% and %????%" /body:"my body %date% and after %?????%"the %????% is what i am looking for!!!!
Into this code i call an application, the CLmailer, which sends the email... It sends the email including the subject, body, to etc. into the subject and the body, except of my comments, i want to be sent extra info the current date and the date 5 days after the current. I have achieved only the current date, by the %date% command, but i cannot figure out the command of the date 5 days after the current... I'm looking forward some discussion and solves on the issue!

echo date %date% > save-cur-date.bat echo time %time% > save-cur-time.bat time 23:59:59 :delay 2 secs so that date changed to tomorrow. ping -n 2 127.0.0.1 > nul time 23:59:59 :delay 2 secs so that date changed to day 2. ping -n 2 127.0.0.1 > nul :delay 2 secs so that date changed to day 3. ping -n 2 127.0.0.1 > nul :delay 2 secs so that date changed to day 4. ping -n 2 127.0.0.1 > nul :delay 2 secs so that date changed to day 5. ping -n 2 127.0.0.1 > nul set day5=%date% call save-cur-date.bat call save-cur-time.bat :Now you have the day5 date in varilable %day5%
:In the process computer's time will be delayed by 10 seconds :-(--
Holla.EDIT: See the solution in next post, which is better

This is little better and eats up negligible time off the computer.
@echo off set saveCurDate=%date% set saveCurTime=%time% for /l %%I in (1,1,5) do call :NextDay set day5=%date% date %saveCurDate% time %saveCurTime% echo Now you have the day5 date in varilable day5 (%day5%) goto :eof :NextDay set oldDay=%date% time 23:59:59.99 :Loop if %oldDay%==%date% goto Loop goto :eof--
Holla.

![]() |
report not connecting to ...
|
Renaming file with create...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |