Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Long filenames and the run command
Message
From
04/08/1999 01:56:11
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00247690
Message ID:
00249593
Views:
16
>>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
>
>part of the problem is that the line should read:
>
>RUN &lcRunCmd
>
>Some things to be aware of:
>
>First, if an LFN contains a space, you MUST encapsulate the path in double quotes when passing it on the command line; IOW, if you want to reference the file:
>
>C:\My Program\Some Directory\ a file name.txt
>
>and put it in myZip.ZIp, the command line would have to read:
>
>PKZIP -a MyZip "C:\My Program\Some Directory\ a file name.txt"
>
>Second, PKZIP ius clueless about handling LFNs; you'll want to get the equivalent short file name for the long file name(s) or path(s) for use in your command line. There's sample code in the FAQ showing how to get the Short File Name of a Long File name using an API call (I wrote it) called How do I determine the Short version of a Long File Name under Win32 and Other APIs.
>
>Good luck!
>

PMFJI:

Hi Ed:

Just a clarification: PKWARE has released (3/99) a free patch to PKZIP 2.04G to PKZIP 2.50 that fully supports legacy syntax and also LFN's. The only catch is that it only patches the Registered version of PKZIP/PKUNZIP -- and you must have all the files from the original distribution for it to work. Alternately, they also have a PKZIP v.2.50 Command Line for NT (and 95/98) that is full 32-bit, and encompasses both ZIP and UNZIP functions -- but with somewhat revised syntax. I also found that 'MOVE/FRESHEN' does not work for me for the 32-bit command line version, and their tech support has yet to give a meaningful response. The PKZ250 upgrade, however, has been totally painless...

Rob
Previous
Reply
Map
View

Click here to load this message in the networking platform