I'm using the following code to zip files from foxpro using powerarchiver as my zipper, I'm having problems with any paths that have spaces even though I am trying to pass quoted paths, any ideas?
parameters filetozip,ziptoname,zippassword
filetozip = '"'+filetozip+'"'
ziptoname = '"'+ziptoname+'"'
if zippassword != ""
zippassword = '-s"'+zippassword+'"' && putting the -s part in here stops it failing when no password is passed.
endif
run C:\PACL\PACOMP -a -c2 -w -q &zippassword &ziptoname &filetozip
return
it works fine as long as there are no spaces in the paths passed but this is not good enough for my needs.
Thanks in advance.
Ken.
parameters filetozip,ziptoname,zippassword
filetozip = '"'+filetozip+'"'
ziptoname = '"'+ziptoname+'"'
if zippassword != ""
zippassword = '-s"'+zippassword+'"' && putting the -s part in here stops it failing when no password is passed.
endif
run C:\PACL\PACOMP -a -c2 -w -q &zippassword &ziptoname &filetozip
return
it works fine as long as there are no spaces in the paths passed but this is not good enough for my needs.
Thanks in advance.
Ken.