Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Zipping Files
Message
From
25/10/2002 06:28:14
 
 
To
25/10/2002 06:06:25
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00715324
Message ID:
00715330
Views:
10
>I have a line of code like the following in which I'm trying to zip some files.
>
>STORE 'e:\files\test.zip' TO m.zipfile
>STORE ALLTRIM(&path_name +"*.*") TO m.fileszipped
>RUN c:\windows\pkzip.exe -ex m.zipfile m.fileszipped
>
>If I look through the debugger
>m.zipfile "e:\files\test.zip"
>m.fileszipped "c:\temp\*.*"
>
>But this does not create my zipfile. Not sure whats happening because
>the Dos box flash up to quick to see any errors.
>
>
>Anyone any ideas?

You need to expand the variables before issuing the run command. Try:
STORE 'e:\files\test.zip' TO m.zipfile
STORE ALLTRIM(&path_name +"*.*") TO m.fileszipped
cRunCommand = 'RUN C:\WINDOWS\PKZIP.EXE -ex ' + m.zipfile + ' ' +m.fileszipped
&cRunCommand
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform