Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Execute an external with variable

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Execute an external with variable
  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 >>
 Execute an external with variable - 3/28/2005 2:41:01 AM   
  RACM

 

Posts: 1
Score: 0
Joined: 3/28/2005
From: USA
Status: offline
I want to get the file names, then use an external executable to process these file names. I figured out how to get the file names but am having trouble on the syntax for having the executable process the files. Here's what I have:

Set filesys = CreateObject("Scripting.FileSystemObject")
filepath = filesys.GetAbsolutePathName("c:\")
Set TargetFolder = filesys.GetFolder(filepath & "\data\")
Set FolderFiles = TargetFolder.Files
For each targetfile in FolderFiles
Dim WshShell,oExec
Set WshShell = wscript.createobject("wscript.shell")
Set oExec = WshShell.Exec("c:\processit.exe ")
next

On the second to last line I'd like to append the targetfile.name to the executable.

Any help would be greatly appreciated. Thank you.
 
 
Post #: 1
 
 
 
  

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 >> Execute an external with variable 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