Jump to content

Recommended Posts

Posted

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

Posted

anyideas why this wont work

 

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

Posted

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...