PDA

View Full Version : Zip Files - How do I?



NewsArchive
12-18-2009, 03:59 AM
Ok, I'm being blonde, or old, or somethin....
I am trying to zip up my "results files" (a bunch of .txt files in a single
temporary folder).
I did "Zip File(s)"
Archive Name: %_SB_INSTALLDIR%\TCS_Updates\%TP_DBNAME%_%TODAY%.z ip
Source File Specification: "%TCS_TEMP%\*.*"
Password: yada-yada
QuietMode: checked
Include Subfolders: checked
Encrypt Data: checked.

Result: I get the properly named .zip file in the proper directory, but
when I open it, it appears that there are no files in it.
I have tried it with encryption off, and no password, and I get the same
result.
I am deleting the files right after I zip them.

Zip Files from ""%TCS_TEMP%\*.*"" to
"%_SB_INSTALLDIR%\TCS_Updates\%TP_DBNAME%_%TODAY%.z ip"
Delete Tree "%TCS_TEMP%"

What am I doing wrong?

Thanks,
-Glenn.

NewsArchive
12-18-2009, 03:59 AM
Glenn,

>
> What am I doing wrong?
>

The question is, how do you open it? Try WinZip and I am sure you see the
files.

If you are using Explorer, I assume you are running into the Windows bug.
The built-in Windows ZIP does not follow 100% the 2.04g ZIP
industry-standard for recursive added files/folders. That's why you do not
see the first folder (or no files/folders at all in Explorer). If you use
WinZip (or PKZIP) to open your perfectly valid ZIP then I am sure you'll see
all files and folders.

Hope this helps.

Friedrich

NewsArchive
12-19-2009, 02:37 AM
You are right.
If I use WinRar, I see it all correctly.
I did notice that it zips full folder path.
Is there a way to get only the files with no pathing?

Thanks,
-Glenn.

NewsArchive
12-19-2009, 02:38 AM
You said to include subfolders. I think when you do this it has to save the
paths.

Abe Jimenez

NewsArchive
12-19-2009, 02:38 AM
Hi Glenn,

> You are right.
> If I use WinRar, I see it all correctly.
> I did notice that it zips full folder path.
> Is there a way to get only the files with no pathing?

No, this is not possible. If you "Include Subfolders" then it will add all
files and folders.

If you do not enable the above option then it will only add the file(s), not
the folder item.

Friedrich

NewsArchive
12-19-2009, 02:39 AM
I understand the need to include the relative path, but not the full path.
In PKZip, or Winrar, if I ZIP a folder, the only pathing it keeps is
relative to the folder I am archiving.
In the other packages, this option is "Store relative paths" vs. "Store full
paths"

for example, in PK or WinRar, if I archive including subfolders everything
in c:\a\b\c\*.* (directory C contains directories D and E)

a.txt c
b.txt c\d
c.txt c\d
d.txt c\e
e.txt c\e

The same thing in SetupBuilder creates:

a.txt a\b\c
b.txt a\b\c\d
c.txt a\b\c\d
d.txt a\b\c\e
e.txt a\b\c\e

Not trying to be nit pickey, just alot of extra folders to drill down thru
when I restore the zip, plus all the extra folder paths it creates.

Glenn Paschal

NewsArchive
12-19-2009, 02:40 AM
Oh, and do you have a link describing this bug? I need to put it to our
people, as we use Windows Zip frequently on our customers sites.
(most do not have any form of zip app installed, and it is considered
unacceptable for us to install anything with out their ok)

Thanks,
-Glenn.

PS. in case I forget later, Merry Christmas, Friedrich!!

NewsArchive
12-19-2009, 02:40 AM
Hi Glenn,

> Oh, and do you have a link describing this bug? I need to put it to our
> people, as we use Windows Zip frequently on our customers sites.
> (most do not have any form of zip app installed, and it is considered
> unacceptable for us to install anything with out their ok)

I can't remember the URLs, sorry. We reported this to Microsoft when XP
came out (late 2002) and it's a known "limitation". The problem is in the
underlying DynaZip component and so you'll see it in all recent Windows
operating systems.

>
> PS. in case I forget later, Merry Christmas, Friedrich!!
>

Thank you :) Merry Christmas to you and yours!

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder is Windows installation -- "point. click. ship"

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
12-20-2009, 09:11 AM
Glenn,

> Not trying to be nit pickey, just alot of extra folders to drill down thru
> when I restore the zip, plus all the extra folder paths it creates.

SetupBuilder makes use of LSZip to zip/unzip. If you enable the "Include
Subfolders" option in the "Zip Files" SetupBuilder function then it saves
the full path info and includes all subfolders (identical to WinZip with the
"Save full path info" and "Include subfolders" options enabled).

See attached code snipped to zip files without saving the full path
(identical to WinZip with the "Save full path info" option disabled and
"Include subfolders" enabled). I can send you the project if you need it.

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder is Windows installation -- "point. click. ship"

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
12-22-2009, 02:06 AM
Very cool! Thanks Friedrich.

Glenn Paschal