Computing.Net > Forums > Disk Operating System > DOS Programming

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

DOS Programming

Reply to Message Icon

Name: hharding
Date: December 11, 2003 at 14:33:14 Pacific
OS: WIN2K
CPU/Ram: Enough
Comment:

How do I subtract one day from the day variable "dd" below?

for /f "tokens=2" %%i in ('date /t') do set thedate=%%i
SET mm=%thedate:~0,2%
SET dd=%thedate:~3,2%
SET yy=%thedate:~8,2%

I also need a good site that shows you how to program in DOS.

thanks



Sponsored Link
Ads by Google

Response Number 1
Name: x86
Date: December 11, 2003 at 14:35:51 Pacific
Reply:

There is NO M$DOS IN NT IT IS AN EMULATION called Virtual DOS machine (VDM)

http://www.windowsitlibrary.com/Content/226/03/1.html

http://www.ss64.com/nt/index.html


0

Response Number 2
Name: Wengier
Date: December 11, 2003 at 19:03:51 Pacific
Reply:

In fact, there is not even Virtual DOS Machine (VDM) in this case. He is actually in pure "NT Command Prompt" (a.k.a. WinNT Console), similar to "OS/2 Command Prompt". *Only when* the user is trying to run a DOS program (e.g. by typing "MEM /D" in the NT Console), then WinNT/2K/XP will automatically call NTVDM.exe (NT Virtual DOS Machine) to run the specified DOS program in the NT Console. If you rename or delete the file NTVDM.exe in %windir%\SYSTEM32, then you will only be able to run WinNT Console programs (like CMD.EXE), not DOS programs any more.


0

Response Number 3
Name: dtech10
Date: December 12, 2003 at 13:42:48 Pacific
Reply:

Hi hharding

You could subtract 1 day from the "dd" variable like this, but it won't always be tomorrow's date.
But you could always use other operators to
calculate the month and last day of month.
I'll work on this one, and post back.

rem Var DD -1
set /a dd=%dd%-1

Below is an interesting site your might help
with calulating tomorrows date.
How this helps.
Harry

http://www.robvanderwoude.com/index.html


0

Response Number 4
Name: bitbyte
Date: December 12, 2003 at 15:29:41 Pacific
Reply:

my datetime.com program can sub and add days/months to a date

download at http://plop.at
look to the example del files older than 2 days


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: DOS Programming

Error Code trying to run a DOS program www.computing.net/answers/dos/error-code-trying-to-run-a-dos-program/3769.html

Passing commands to a DOS program www.computing.net/answers/dos/passing-commands-to-a-dos-program/2429.html

DOS program to format new harddrive www.computing.net/answers/dos/dos-program-to-format-new-harddrive/4851.html