Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Automatically zip selected files..
Message
From
20/12/2001 10:28:47
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00595986
Message ID:
00596771
Views:
25
I created an app that zips all *.dbf files in a directory..
here is a sample.. hope it helps:

FOR ncount = 1 TO ALEN(ziparray,1)
SET DEFAULT TO &thisdir
zipdbf = ziparray(ncount,1) && Name of file (*.dbf)
WAIT WINDOW ' first table is ' + zipdbf TIMEOUT 5
thisdir2 = thisdirdbf
thisdir3 = thisdirdbfM
lcCmd = '"C:\Program Files\Winzip\wzunzip" -ys -o -ybc ' + zipdbf + ;
"*.dbf " + &thisdirdbf
! /N &lcCmd && Unzip the list of zip files Using winzip into current
* directory...
dirzip = thisdirdbf
WAIT WINDOW 'Processing Zipfile # ' + ALLTRIM(STR(ncount)) + ' OF ' +;
ALLTRIM(STR(zipnum)) + ' From ' + zipdbf TIMEOUT 5

* You need the Timeout 5 above since foxpro doesn't know when the winzip will finish.....

...
.. more code..
...
...

endfor
Previous
Reply
Map
View

Click here to load this message in the networking platform