topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Sunday October 13, 2024, 11:52 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Add to archive "FileName.xpi"  (Read 6720 times)

Yaron

  • Participant
  • Joined in 2014
  • *
  • default avatar
  • Posts: 22
    • View Profile
    • Donate to Member
Add to archive "FileName.xpi"
« on: March 26, 2014, 06:41 PM »
I use WinRar.

In Options > Settings > Integration > User defined archive extensions, I've associated XPI and JA files with the program.


I would like to add the following entries to Windows Explorer's context menu:

1) Add to archive "FileName.xpi"
2) Add to archive "FileName.ja"


I'd like the entries to appear below the default "Add to archive 'FileName.zip'", and also the compression format to be in my zip settings.


*

If you know of another Archiver with which I could achieve that, please let me know.


(Win 7, 32 bit).

Thank you.


http://www.sevenforu...ve-filename-xpi.html
« Last Edit: March 26, 2014, 06:47 PM by Yaron »

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: Add to archive "FileName.xpi"
« Reply #1 on: March 30, 2014, 05:55 PM »
This ahk script is meant to create a command line with the selected files rather than launch an instance of the program for each file selected in Explorer:
http://www.autohotke...2Bwinrar#entry629031

The only way I can think to get .xpi would be to compress to .zip and rename the .zip to .xpi.

Yaron

  • Participant
  • Joined in 2014
  • *
  • default avatar
  • Posts: 22
    • View Profile
    • Donate to Member
Re: Add to archive "FileName.xpi"
« Reply #2 on: March 30, 2014, 08:08 PM »
Thank you. :)

That script might be useful.
When I need to compress to xpi, I rename the zip file. Maybe I should look for a script to rename the newly created zip file.
What do you think?

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: Add to archive "FileName.xpi"
« Reply #3 on: March 31, 2014, 09:31 AM »
When doing by hand most people compress to zip, then rename to xpi.  You might post a follow up to that script thread and explain how you would like to use it.  The author may be willing to offer some variations.  Especially since his script uses WinRar already.

After that it would just be a registry edit to add your context menu item to All Files, and if you like to All Folders.  There are plenty of pages showing how to do that already on the web.  If not on Windows Seven Tutorials, I know I've seen it in HowToGeek.


Yaron

  • Participant
  • Joined in 2014
  • *
  • default avatar
  • Posts: 22
    • View Profile
    • Donate to Member
Re: Add to archive "FileName.xpi"
« Reply #4 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.

Yaron

  • Participant
  • Joined in 2014
  • *
  • default avatar
  • Posts: 22
    • View Profile
    • Donate to Member