Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


wzzip blank spaces

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> wzzip blank spaces
  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 >>
 wzzip blank spaces - 11/8/2007 1:05:08 PM   
  avkuvalekar

 

Posts: 13
Score: 0
Joined: 11/8/2007
Status: offline
Hi guys,

I am a noob in vbscript. I want to zip a few files and here's the command that I am trying -


dim
oShell

Set
oShell = WScript.CreateObject ("WSCript.shell")
oshell.run """"wzzip & O:\test\123\456\LIVE Archive\ad1"" & d_append & "".zip O:\test\123\456\LIVE Archive\*.trd O:\test\123\456\LIVE Archive\*.dia O:\test\123\456\LIVE Archive\*.log""" ,6,True

and it gives an error saying file not found. I have tried various options like putting 3 quotes after ad1, putting 1 quote, 2 quotes but none of them would work.
It's the bloody Live Archive that's creating problems because of the blank spaces. Can anyone help me please?

Thanks!


< Message edited by avkuvalekar -- 11/8/2007 1:06:11 PM >
 
 
Post #: 1
 
 RE: wzzip blank spaces - 11/8/2007 6:08:16 PM   
  ehvbs

 

Posts: 2197
Score: 50
Joined: 6/22/2005
From: Germany
Status: online
Hi avkuvalekar,

your command line is syntactically wrong, so I may misinterpret it. But I hope the following
steps will solve your problem.

(1) get it right on a command line/in a dos box

      
   where (X1) is the value of your variable d_append

(2) if it works, copy the command line into a .bat file and call this from your script

(3) if you can't/won't use a .bat file, copy the working command line into the script

      
   double the existing " and put " around the whole mess

(4) if it works, replace your replace for (X1) like this:
     ... ve\ad1(X1).zip""  ...
     ==>
     ... ve\ad1" & d_append & ".zip""  ...

Good luck!

ehvbs

    

< Message edited by ehvbs -- 11/8/2007 6:09:35 PM >

(in reply to avkuvalekar)
 
 
Post #: 2
 
 
 
  

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 >> wzzip blank spaces 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