Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Batch File run

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,43805
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Batch File run
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Batch File run - 2/27/2007 1:03:09 AM   
  swerver

 

Posts: 27
Score: 0
Joined: 12/18/2006
Status: offline
Hi All,

I have a batch file that reads:

call process fileName.log

call process calls process.bat and this runs a small program.

I need a VBScript that will pass and run the 1st batch file.

I have tried

dim runBatch
dim FileName
set objShell = wscript.createObject("wscript.shell")

FileName = "testing.log"

runBatch = "call process " & fileName
objShell.run(runBatch)


VBS doesn't seem to like this.

 
 
Post #: 1
 
 RE: Batch File run - 2/27/2007 2:40:12 AM   
  mikeock


Posts: 124
Score: 1
Joined: 6/8/2006
Status: offline
Are you calling the script from the directory that has the batch file?
It look like you are executing it without the fill path.

try chanign this to the correct path
runBatch = "c:\scripts\call process " & fileName

_____________________________

My sig sucks!

(in reply to swerver)
 
 
Post #: 2
 
 RE: Batch File run - 2/27/2007 2:42:02 AM   
  Country73


Posts: 735
Score: 10
Status: offline
I'm not sure I'm understanding your question correctly; are you just trying to put a vbscript together that will run your initial batch file?

Set objShell = CreateObject("Wscript.Shell")
runBatch = <BatchFileName>
objShell.Run runBatch


If the <BatchFileName> does not exist in the same location as the vbscript, then you will need to provide the path to it.


Is this what you are looking for??

(in reply to swerver)
 
 
Post #: 3
 
 RE: Batch File run - 2/28/2007 2:52:42 AM   
  swerver

 

Posts: 27
Score: 0
Joined: 12/18/2006
Status: offline
Guys,

The script reads some files in a directory
It get the correct name of a file: FileName

The Filename is required for part of a batch file that I'd normally create manually.

By scripting it, I hope to pass the variables, "call process <filename>" into a batch file that is run?

Guess i could create the batch file then write the lines of the batch then run the batch?

(in reply to Country73)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Batch File run Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts