Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ZIP correct file/folder path ?
#1
Hi

I'd like zip folder.
(native zip)

I see in help file, example:
Code:
Copy      Help
 
str zf="$desktop$\test.zip"
str sf.getmacro("List of files to zip")
str sw

out "zip"
zip zf sf 0 sw
if(sw.len) out sw 

If, i delete "List of files to zip" text  and run  is empty zip, OK

but

Wat is  the correct format path, if files? for example: c:\\test.txt  ...???
and
Wat is  the correct format path, if folder? for example: c:\\00\*.*   ...???

Thanks
#2
for a single file can do this
Code:
Copy      Help
str zf="$desktop$\test.zip";;name and location of new zip file
str sf="c:\\test.txt";; file to zip
str sw
out "zip"
zip zf sf 0 sw
if(sw.len) out sw

for multiple file can do this
Code:
Copy      Help
;//for multiple files can do this
str zf="$desktop$\test.zip";;name and location of new zip file
str sf=
;c:\\test.txt
;c:\\test2.txt
;c:\\test3.txt
;c:\\test3.txt

str sw
out "zip"
zip zf sf 0 sw
if(sw.len) out sw

for a folder can do this. This will zip all the files and  files in subfolders 
Code:
Copy      Help
str zf="$desktop$\test.zip";;name and location of new zip file
str sf="c:\\00";; folder to zip
str sw
out "zip"
zip zf sf 0 sw
if(sw.len) out sw

or lets say you only wanted to zip text files in that folder can do this
Code:
Copy      Help
str zf="$desktop$\test.zip";;name and location of new zip file
str sf="c:\\00\*.txt";; folder to zip
str sw
out "zip"
zip zf sf 0 sw
if(sw.len) out sw
#3
Very thanks Kevin
Norbert
from Hungary


Forum Jump:


Users browsing this thread: 1 Guest(s)