Date processing in DOS bat files
Results 1 to 2 of 2

Thread: Date processing in DOS bat files

  1. #1
    Join Date
    Oct 1998
    Location
    Boston, MA, USA
    Posts
    1

    Date processing in DOS bat files

    I am writing a DOS bat file that kicks off 2 WIN32 applications on an NT server. One of the apps takes in dates as parameters. I need to get the current date and the current date minus 7 days as the parameters. Does anyone have any suggestions?

  2. #2
    Join Date
    Aug 1998
    Posts
    86
    I recomend you to write a small QBASIC program to get and compute the dates (use the DATE$ function). Then the prog can SHELL the necessary commands, or PRINT a batch file to be executed (with the dates already computed and inserted at the appropriate places).

    If you still want to use plain DOS batch files, the following site contain links and lots of tricks (includng how to get the date, manipulate strings and make numerical computations); you will definitely find a solution or idea:
    http://mh101.infi.net/~wtnewton/batch/batfaq.html

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •