zip compress with output filename = input filename

The dedicated forum for PCMan File Manager - http://wiki.lxde.org/en/PCManFM
Locked
Le Limule
Posts: 1
Joined: Sun Jan 29, 2012 6:31 pm

zip compress with output filename = input filename

Post by Le Limule »

hello,

i use zip to compress files with pcmanfm. i edited /usr/share/libfm/archivers.list with:
[zip]
create=zip -r COMPRESS.ZIP -@
mime_types=application/zip;

("-@" take the stdin, COMPRESS.ZIP is my output file)

then i choose "zip" in the archivers list in pcmanfm.

this works.

but i want my output file to be the same name as stdin. how can i do?
(i try to replace COMPRESS.ZIP with %f, %F, <nothing>, -, ., *: it doesn't work)

i read in the zip man page that with "zip - -@", zip write the zip file to standart output, allowing the output to be piped to another program. For example:
zip -r - . | dd of=/dev/nrst0 obs=16k

but i don't know what to do for my case.

someone can help me?
Locked