Page 1 of 1

What about a "copy to parent" option?

Posted: 04 Aug 2009 13:44
by JoTo
Hi Donald (and all others :) ),

for me its often the case that i unpack e.g. a ZIP archiv with a context menu option. In the context menu i have "Unpack here" and "Unpack to <name_of_the_Archiv_subfolder>.

And following Murphys law i ever choose the wrong one. :) If i choose "Unpack here" i get my actual directory messed up with 100eds of files mixing with already existing ones that live there before the unpack takes place. ARRG!So i mostly choose "Unpack to <subfolder>" option.

But then i often end up with the zip content in a double subfolder because the zip archiv already contains a subfolder in its structure. E.g. i unpack test.zip with the "Extract to test subfolder" shell context menu option and the zip archiv already contains a test folder where the real files sit in, i end up with the files in .\test\test\<here are the files>.

Then my regular task is to mark all the files and move them to parent folder. OK, new WinRAR version now solves this problem in most cases with an option to remove double folders at the end of the path, but this is not the only case when such a "Move/Copy to parent" would come handy. Sometimes i just want to move some files out of the way to perform some batch renaming, whatever. Then i move them to parent, do the actions i need, and move them back again (Moving down is easy when you go up to parent and you see the childfolder in the list).

I now have to drag/drop the files into the tree. But that needs me to first spot out the right folder in the tree where to drop. If you have many similar named folders, then its sometimes difficult to tell which one is the correct one.

So i wonder if you and some others maybe agree, that expanding the already existing context menu items "Move/Copy ..." "here as copy", "here to new subfolder", etc. could be extended by another item "Copy/Move to parent"?

Any comments? Good? Bad? Will i got burned by the community now as a heretic for this idea? :) Or am i only to dumb to see that this functionality is already there?

Greetings to all
JoTo

Re: What about a "copy to parent" option?

Posted: 04 Aug 2009 15:34
by zer0
In WinRAR, you can also specify what kind of paths you want extracted: none, full or absolute. This setting also forms part of a profile. So if you specify not to extract any paths then when you right-click and select Extract here... then all files will be extracted to your current folder. If you right-click and select Extract to <name_of_the_Archive_subfolder> then files will be extracted into that folder without paths either and you'll have your desired effect. So this functionality is not in XY but in WinRAR already.

Does this satisfy your needs?

Re: What about a "copy to parent" option?

Posted: 04 Aug 2009 17:18
by admin
I know this case of Murphy's law very well myself. It should be doable by a simple script. May others write it! :P

Re: What about a "copy to parent" option?

Posted: 04 Aug 2009 17:27
by serendipity
admin wrote:I know this case of Murphy's law very well myself. It should be doable by a simple script. May others write it! :P
A quick one:

Code: Select all

//Focus list
  focus; 
//Cut file
  #200;
//Go to parent
  #523;
//Paste file
  #202

Re: What about a "copy to parent" option?

Posted: 04 Aug 2009 18:30
by TheQwerty
The Move/Copy commands support paths relative to the current path, so you could just define a UDC with location of "..".

Or as a script for working with just the list selection:

Code: Select all

"Move To Parent" Focus;MoveTo("..");
"Copy To Parent" Focus;CopyTo("..");

Re: What about a "copy to parent" option?

Posted: 05 Aug 2009 10:05
by JoTo
Solved! :)

OK, i agree, i was too dumb to find the functionality. :(

I went "TheQWERTY"s way with the UDC. That was a piece of cake to do and do exactly what i need.

Thanks to all scriptwriters and repliers as well.

XYPlorer for Bundeskanzler! :)
Greetings
JoTo