Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • September 29, 2016, 05:10:54 AM
  • Proudly celebrating 10 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: IDEA: "Compress each folder to separate archive"  (Read 8514 times)

neptitude

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 5
    • View Profile
    • Donate to Member
IDEA: "Compress each folder to separate archive"
« on: December 30, 2009, 09:20:58 AM »
Using Windows Explorer in Vista with WinRAR (or 7zip) installed, when I right click on a group of archives, there is a menu choice to Extract each archive to separate folder in WinRAR (or Extract to "*\" in 7zip). I have a number of folders, each with hundreds of subfolders and I need to create .zips or .rars of each subfolder. (I'll be posting these archives to Usenet, so RARs are preferred). Doing them one at a time is going to drive me mad.  :-\

I'd like to see a simple right-click menu item saying Compress each folder to separate archive. Choosing this command will take each folder in a group of 2 or more selected folders and RAR (preferably) or ZIP each folder to a separate archive in the same directory (using the program defaults for creating archives). Or, if they are right-click-dragged to another folder, the option will be Compress each folder to separate archive here, creating the archives in the target directory.

I don't think recursiveness is required since it's not offered in the Extract... command this is mirroring and might make things too complex.

Doable? Soon, maybe?

slowmaker

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 51
  • Reinventing the wheel can be fun!
    • View Profile
    • rambling-nerd
    • Read more about this member.
    • Donate to Member
Re: IDEA: "Compress each folder to separate archive"
« Reply #1 on: January 03, 2010, 12:22:52 AM »
Drag and Drop Robot might do what you're after, but it wouldn't be on the context menu. I only just started playing with it myself, so I can't be sure, but the help file introduction has this in it:

Quote
A good example for the use of Drag and Shell Robot is in zipping multiple folders.  First the command line for invoking the zip command is specified, and then folders are dragged from explorer onto the folder queue.  Pressing start will cause the program to walk through the queue, zipping each folder in turn.

Sounds pretty close to me.
WinXP Home SP3 - PSPad 4.5.4

neptitude

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 5
    • View Profile
    • Donate to Member
Re: IDEA: "Compress each folder to separate archive"
« Reply #2 on: January 03, 2010, 12:04:38 PM »
Thanks for the suggestion, Slowmaker. You're right about it sounding like it should be what I need (minus the right-click functionality).

But after trying it and spending a few hours playing with it, I'm finding that
  • the program uses way too much of my CPU, taking up one entire core of my quad core, and
  • it gets "stuck" pretty often, freezing mid-operation and refusing to interrupt its task, so I have to kill the process in Task Manager.

I can't figure out what is special about the files it gets stuck on -- some are very big, others small, some early in a batch and some late. I did notice that it is very picky about filenames, throwing up errors if there are periods in the file or folder name.

So, while it was a good suggestion, it's still not what I need.

I'm hoping that the lack of responses other than yours is just due to the New Year holiday and that I might get other suggestions next week.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,634
    • View Profile
    • Donate to Member
Re: IDEA: "Compress each folder to separate archive"
« Reply #3 on: January 03, 2010, 01:43:37 PM »
I could write you an app that would do what you want but it's not going to have the full shell integration you're requesting.  Basically, you would have a source and destination folder and a few zipfile options.  Heck, I could even add your method to SpinZip, another Coding Snack I wrote.  Your thoughts?

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,591
    • View Profile
    • Donate to Member
Re: IDEA: "Compress each folder to separate archive"
« Reply #4 on: January 03, 2010, 05:23:07 PM »
I don't have it installed here but I'm pretty sure WinRAR already does this (though not from the context menu)

it's a while since i've done this but there's an option (checkbox) on one of the tabs when creating an archive

downside is that you can't pick a single folder and apply it to all the subfolders (you have to select the folders first)

it could also be worth looking at the command line options (these could be scripted)

neptitude

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 5
    • View Profile
    • Donate to Member
Re: IDEA: "Compress each folder to separate archive"
« Reply #5 on: January 03, 2010, 05:34:00 PM »
Hey, skwire, I guess adding it to SpinZip would work as long as I could drag-n-drop a handful of folders onto it and have it zip each dragged folder individually. Of course, I would prefer if it used RAR, but if that's not an option, ZIP works. Since any coding I do is in JavaScript or ActionScript/Flex, I have no idea of what's involved in calling another program or registering an extension with the shell -- that's getting way beyond my level of competence or understanding.

Meanwhile, while I was at the Skwire Empire, I downloaded Trout and I'm testing it out right now. I think I'm going to love it. Besides everything else, it's CPU usage is barely registering on Process Explorer. That's important to me as a web developer since I'm usually running Firefox, IE, Safari, Chrome and Opera when I'm building and they're all resource hogs. A lot of times, I have to work with no music at all since iTunes and even MediaMonkey use magnitudes more cycles than Trout. Working without music = Horrors!

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,163
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: IDEA: "Compress each folder to separate archive"
« Reply #6 on: January 03, 2010, 06:36:15 PM »
it could also be worth looking at the command line options (these could be scripted)

That's what I was thinking.  If you could get it done with a command in each folder, I know Python(and I'm sure other scripting languages) has a path walk() function that visits the subfolders in the path tree and performs a command in each.

neptitude

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 5
    • View Profile
    • Donate to Member
Re: IDEA: "Compress each folder to separate archive"
« Reply #7 on: January 03, 2010, 07:10:13 PM »
D'oh!!

@Target: Thanks! It's not very obvious but, you're right! There is an option built-in to WinRAR which allows you to do what I need it to do. It's on the attached screenshot.

It even works, sort-of, from the right-click menu. When you select a bunch of folders (or files) then right-click and choose Add to archive..., when you switch to the Files tab, the files are pre-entered in the Files to add field. It's just a matter of checking the Put each file to separate archive box and it's doing exactly what I needed it to.

Thanks for all of your time and suggestions! I've got what I wanted and didn't even have to install another piece of software. (Except for Trout which is making me very happy I installed it!)


skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,634
    • View Profile
    • Donate to Member
Re: IDEA: "Compress each folder to separate archive"
« Reply #8 on: January 03, 2010, 09:42:09 PM »
Hey, skwire, I guess adding it to SpinZip would work as long as I could drag-n-drop a handful of folders onto it and have it zip each dragged folder individually. Of course, I would prefer if it used RAR, but if that's not an option, ZIP works.

Regarding RAR support in SpinZip, I would have added it long ago if not for the license:
   5. The RAR/WinRAR unlicensed trial version may be freely distributed,
      with exceptions noted below, provided the distribution package is not
      modified in any way.
     
      a.  No person or company may distribute separate parts of the package
          with the exception of the UnRAR components, without written
          permission of the copyright owner.
     
      b.  The RAR/WinRAR unlicensed trial version may not be distributed
          inside of any other software package without written permission
          of the copyright owner.

Meanwhile, while I was at the Skwire Empire, I downloaded Trout and I'm testing it out right now. I think I'm going to love it. Besides everything else, it's CPU usage is barely registering on Process Explorer. That's important to me as a web developer since I'm usually running Firefox, IE, Safari, Chrome and Opera when I'm building and they're all resource hogs. A lot of times, I have to work with no music at all since iTunes and even MediaMonkey use magnitudes more cycles than Trout. Working without music = Horrors!

Good to hear you're liking Trout; that one has been a fun project over the past year.

@Target: Thanks! It's not very obvious but, you're right! There is an option built-in to WinRAR which allows you to do what I need it to do. It's on the attached screenshot.
It even works, sort-of, from the right-click menu. When you select a bunch of folders (or files) then right-click and choose Add to archive..., when you switch to the Files tab, the files are pre-entered in the Files to add field. It's just a matter of checking the Put each file to separate archive box and it's doing exactly what I needed it to.

Grrr...now see?  I've known, and used, this option in the past within WinRAR but I never realised that it would work with folder names as well.  Good to know for future use.

Mickets

  • Participant
  • Joined in 2010
  • *
  • Posts: 13
    • View Profile
    • Donate to Member
Re: IDEA: "Compress each folder to separate archive"
« Reply #9 on: March 16, 2010, 03:22:18 PM »
It can be done in WinRAR - check the options.

BraZIP can also do it, included in the Right-Click options.