View Single Post
Old 29 May 2002, 17:21   #1

Bloodwych's Avatar
Join Date: Jun 2001
Location: I'm behind you!
Posts: 3,763
Using zip via a one line directory configurable arguement.

I've been working on a "classic wb 3.0 V4" today and added some great features, like auto-recognition of certain files (LHA, ZIP, MOD) so all you have to do to use them is double click!!! (finally, I've found a simple way to add this feature twist!).

One of the last features I'm trying to add is direct zip support via the popup menu.

With WinUAE now supporting zip files (finally, thanks tony! ) I've decided to remove the ADZ functions from my workbench menu and replace them with zip functions. The idea is you highlight a drawer or file and can then select zip/unzip from the popup menu, just like in windows.

I've got unzip working fine on archive files - it extracts in the current directory and works a treat.

The problem is adding direct zip support - it's not as configurable as Gzip (ADZ) was via cli.

So far when you select "zip" from a popup menu on a file or directory in workbench, this string is passed to cli giving the following command:

Zip -r Rename %p

where -r stands for recursive directories, "rename" the resulting archive name (eg and "%p" is substituted with the path of the given directory/file you've selected.

Two problems I'm having is:

1) No way to make zip name the archive the same as the selected file/folder. This is annoying because you have to manually rename the zip after creating it.

2) Zip adds parent directories to the archive, not just sub directories.

For example:

If you select directory x in the path System:temp in a workbench window and run zip via a right click popup menu, the command passed is:

Zip -r Rename System:temp/x

An archive "" (ideally want the name to be "x") is produced containing a directory tree starting at "temp", not at "x"

Hmmm. No one will probably understand a word of this but what the hell, I've typed it out now!
Bloodwych is offline  
Page generated in 0.03955 seconds with 10 queries