Messages - Yaron [ switch to compact view ]

Pages: prev1 2 3 [4] 5next
16
Post New Requests Here / Re: Command line - Some questions
« on: April 01, 2014, 09:44 PM »
Thank you. Special thanks for installing WinRar. It's really kind of you.

I'm not a developer, but I often make some small changes in Firefox extensions.
There are thousands of FF developers, and I've been wondering why the major archivers don't include the option to compress directly to XPI.

Please see this post:
https://www.donationcoder.com/forum/index.php?topic=37601.0

I'd be grateful for any further ideas.

*

And thanks to MilesAhead for his help and for referring me to this forum.

17
Post New Requests Here / Re: Command line - Some questions
« on: April 01, 2014, 08:08 PM »
Thank you.

I'm trying to add "Compress to FileName.xpi".


19
Post New Requests Here / Command line - Some questions
« on: April 01, 2014, 06:18 PM »
I've created a batch file for zipping selected items in a folder.
(The file is placed in 'Send to').


If I use the following code:
for %%* in (.) do set CurrentFolder=%%~n* "C:\Program Files\WinRar\WinRar" a -afzip "%CurrentFolder%.xpi"

    The file name is that of the current folder (correct).
    All files are archived whether I select one file or multiple files (wrong).
    Selected folders are not archived (wrong).

If I use the following code:
set file=%~f1 "C:\Program Files\WinRar\WinRar" a -afzip "%file:~0,-4%.xpi" "%1"

    The file name is that of the file on which I right click (correct).
    Only that file is archived even if multiple files are selected (wrong).



How can I know if a single item is selected or more?
What's the condition syntax?
How can I include folders in the archive?


Thank you.

20
Post New Requests Here / Re: Add to archive "FileName.xpi"
« on: March 31, 2014, 07:38 PM »
Thanks again. I appreciate it!

That script is a good idea, but before writing to its author:
 
I've written to WinZip support and they kindly referred me to
http://kb.winzip.com/kb/entry/238/
And suggested to replace zip with xpi.

It might be somewhat ungrateful, but I'm used to WinRar. I still may purchases WinZip.

set file=%~f1
"C:\Program Files\WinRar\WinRar" a -afzip "%file:~0,-4%.xpi"

With that code in a batch file, WinRar compresses to FileName.xpi

I've got some problems with that:
1) If I select all items, folders are not included in the compression (only files).
2) I get the same result whether I select a single file or multiple files (i.e. ALL files are compressed).
2) The compressed file name is always that of the file on which I right-click -> Send To -> Batch.

If I add "%1" to the end of the second line, only the file on which I right-click is compressed.

IOW, I'd like the batch to work like the "Compress to" command.


If you are familiar with batch code, I'd be grateful for help. :)

*

I hope you're doing well.
Best wishes.

Pages: prev1 2 3 [4] 5next
Go to full version