Guest richw Posted July 11, 2005 Posted July 11, 2005 Hi,I've written the following code to zip up my thunderbird email directory. I'm using 7-zip command line app from www.7-zip.org$Filename = @UserName & ".7z " $Dir = @UserProfileDir & "\Application Data\Thunderbird\" Run(@comspec & " /c 7za.exe a " & $Filename & $Dir)The only problem is there is spaces in the path so I need to use the command like this:7za.exe a richardw.7z "c:\Documents and Settings\richardw\Application Data\Thunderbird"So is there anyway I can add the " " around $Dir variable or should I be looking at another way?
LxP Posted July 11, 2005 Posted July 11, 2005 (edited) 7za.exe a richardw.7z "c:\Documents and Settings\richardw\Application Data\Thunderbird"Try this out for size (also includes a space between the filename and the directory now):run(@comSpec & ' /c 7za.exe a "' & $filename & '" "' & $dir & '"') Edited July 11, 2005 by LxP
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now