Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
Long filenames and the run command
Hi everybody,
I am using pkzip to zip up some files in 2 (conditionally 3) directories. We recently gave our customers the ability to install our software using long directory names. That broke the following code:
***************
lcPath = goApp.InstallDirectory
lcRunCmd = lcPath + 'pkzip.exe -P -& a:\bkup.zip + ;
lcPath+'data\*.* ' + IIF(goApp.data4,lcPath + ;
'data\dbc4\*.* ','') + lcPath+ 'data\dbc3\*.* '
&RUN lcRunCmd
****************
goApp.InstallDirectory is the full path to the directory of the installation.
goApp.data4 is a logical that is set if the data4 directory has data.
This works unless they install to a directory using spaces. I tried adding this line right after lcpath=goApp.InstallDirectory
lcPath='"'+lcPath
thinking that you can, in a DOS box, change directories with spaces by typing --- cd\"my directory --- The problem with that is, when I get to the second use of lcPath in the command, the " closes the first quote. The command fails.
As soon as I can get the time, I am switching to DynaZip, but for now I'm on a tight deadline. Any help would be REALLY appreciated. I'll buy you one of the free cokes at the Southern California Conference! :)
By the way, I'm using VFP3.0.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement