+ Post New Thread
Results 1 to 5 of 5
Windows Thread, numbers and batch files in Technical; ok need to create a batch file runs a program then increase date runs program and so forth.. anyway what ...
  1. #1

    russdev's Avatar
    Join Date
    Jun 2005
    Location
    Leicestershire
    Posts
    6,946
    Thank Post
    709
    Thanked 553 Times in 368 Posts
    Blog Entries
    3
    Rep Power
    204

    numbers and batch files

    ok need to create a batch file runs a program then increase date runs program and so forth..

    anyway what need to know is there anyway of adding numbers together rest can work out just cant find a way to increase a number by one each time.

    i know it can be done as seen it done many years ago in pc mag...

    anyideas

    Russ

  2. #2

    russdev's Avatar
    Join Date
    Jun 2005
    Location
    Leicestershire
    Posts
    6,946
    Thank Post
    709
    Thanked 553 Times in 368 Posts
    Blog Entries
    3
    Rep Power
    204

    Re: numbers and batch files

    alright going to use windows script file instead

    Russ

  3. #3

    russdev's Avatar
    Join Date
    Jun 2005
    Location
    Leicestershire
    Posts
    6,946
    Thank Post
    709
    Thanked 553 Times in 368 Posts
    Blog Entries
    3
    Rep Power
    204

    Re: numbers and batch files

    anyideas why this wont work

    Code:
    dim intDay
    dim strCmd
    intDay = 1
    Set WshShell = WScript.CreateObject("WScript.Shell")
    
    do
    	strCmd = "date 0" & intday  & "/01/2005"
    	
    
    	Wscript.echo strCmd	
    	Return = WshShell.Run(strCmd, 1, true)
    	intDay = intDay + 1
    
    loop until intDay => 10
    get error The system cannot find the file specified.

    cheers

    Russ

  4. #4
    ajbritton's Avatar
    Join Date
    Jul 2005
    Location
    Wandsworth
    Posts
    1,632
    Thank Post
    23
    Thanked 75 Times in 45 Posts
    Rep Power
    34

    Re: numbers and batch files

    There is no such command as DATE. It's only accessible from within one of the command processors (e.g. COMMAND.COM or CMD.EXE). You could try constructing a command line something like this...

    CMD.EXE /C DATE dd/mm/yyyy

  5. #5

    russdev's Avatar
    Join Date
    Jun 2005
    Location
    Leicestershire
    Posts
    6,946
    Thank Post
    709
    Thanked 553 Times in 368 Posts
    Blog Entries
    3
    Rep Power
    204

    Re: numbers and batch files

    of course forgot as was running as cscript

    Russ

SHARE:
+ Post New Thread

Similar Threads

  1. Rename a batch of files all at once.
    By Kyle in forum How do you do....it?
    Replies: 10
    Last Post: 19th November 2009, 06:31 AM
  2. Running batch files in vista
    By Kained in forum Windows Vista
    Replies: 6
    Last Post: 4th September 2007, 02:25 PM
  3. Useful contact numbers when contacting support numbers
    By ranj in forum Comments and Suggestions
    Replies: 10
    Last Post: 22nd December 2006, 08:21 AM
  4. Technician Numbers
    By phil_thebeans in forum Wireless Networks
    Replies: 33
    Last Post: 3rd November 2006, 12:39 AM
  5. Blocking Batch Files using Group Policy in Server 2003
    By markwilliamson2001 in forum Windows
    Replies: 13
    Last Post: 4th October 2005, 05:28 PM

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
  •