Multi-Copy/Paste v3.0

Miscellaneous tools
Message
Author
User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

Multi-Copy/Paste v3.0

#1 Post by SFR »

From time to time someone complains about lack of multi copy/paste feature in ROX's context menu.
Sometimes I lament also, therefore I decided to cut it out and made a simple substitute.
(I hope I didn't reinvent anything already existing?)

The attached .pet adds three entries to right-click "Open With..." list: Multi-Copy (Add), Multi-Copy (New) and Multi-Paste
Why "Open With..."? It's the only customizable item which I've found available when selecting many objects...

Multi-Copy (New) creates a new list of items to be copied.
Multi-Copy (Add) adds selected items to existed list.
Multi-Paste opens xterm window and starts copying (cp with -r and -i options).
Thanks to xterm output, if an error will occur or there will be a need to overwrite something, you'll be notified.

Usage:
1. Browse to source place -> select one or more file(s)/folder(s) -> right-click -> Open With... -> Multi-Copy (New) or Multi-Copy (Add)
2, If needed - repeat 1st step (using Multi-Copy (Add)).
3. Browse to destination place -> select one or more folders -> right-click -> Open With... -> Multi-Paste
After copying there's opportunity to delete ALL source files and folders (rm with -r and -f options). <- carefully with that!
If source items won't be deleted, they're still available for further pasting...

That's it.

Limitation:
Doesn't work on "top" of filesystem(s), I mean one cannot paste item(s) directly into, eg. /, there must be specific folder or folders selected.
It's the matter of ROX (or my ignorance?) - right clicking on empty space won't bring up "Open With..." list.

I ran several tests on Lupu, Slacko, Wary and Pizzasgood's "Puppy 4.2.1 Multiuser r3" (so, hopefully it should work on other older Puppies too) - and suprisingly everything seems to work well...
Just in case: please don't trust me and use it carefully.

BTW, I was going to add Xdialog UI + some enhancements, but instead I've chosen to simplify it as much as possible.
It's just copying - should be fast, transparent and without bells & whistles.
(A little Angel on my right shoulder calls it "a well justified laziness").
But if someone more skilled would like to enhance this app - feel free!

Written on Lupu-528.004.
___________

Changelog

Update 2012-03-26, version 1.1:
- Displays short usage instruction during installation.
- If there were copying errors, opportunity to delete source objects is disabled.

Update 2013-11-03, version 2.0:
- Complete rewrite, see this post for details.

Update 2013-11-03, version 2.1:
- restored ability to paste into multiple folders at once
- copying/moving doesn't start in "Quiet" mode (requires confirmation)
- new icons

Update 2014-08-10, version 2.2:
- withdrawn: "copying/moving doesn't start in "Quiet" mode (requires confirmation)"
- right-click shortcuts for "Multi-Cut/Multi-Copy" added to individual filetypes and "MultiPaste" to directory/mountpoint, so when selecting a single folder/file, Multi-* options are accesible directly (in case of multiple folder/files - still via "OpenWith" though)
- can create shortcuts on the pinboard, onto which one can drop folders/files to be copied
- pinstall.sh is now "woof-friendly"

Update 2016-12-12, version 3.0:
- complete rewrite
- combines modes from 1.x and 2.x branches

Classic:
- Multi-Cut
- Multi-Copy
- Multi-Paste
(requires no explanation, I believe)

Modern:
- Multi-Add-New: adds selected items to new list
- Multi-Add-Merge: adds selected items to the existing list
- Multi-Copy-To: copies items from the list into selected directory/ies
- Multi-Move-To: moves items from the list into selected directory (only one target dir allowed)

Greetings!
Attachments
multicopypaste-3.0.pet
MD5: e265ee883280b43fdb728442d7e39c23 multicopypaste-3.0.pet
(32.74 KiB) Downloaded 398 times
MultiCopyPaste-2.2.pet
(13.15 KiB) Downloaded 817 times
MultiCopyPaste-1.1.pet
Multi-Copy/Paste v1.1
(2.36 KiB) Downloaded 1064 times
Last edited by SFR on Mon 12 Dec 2016, 18:11, edited 6 times in total.
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#2 Post by SFR »

Tiny update:
- Displays short usage instruction during installation.
- If there were copying errors, opportunity to delete source objects is disabled.

First post updated.

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
darkcity
Posts: 2534
Joined: Sun 23 May 2010, 19:16
Location: near here
Contact:

#3 Post by darkcity »

It's the matter of ROX (or my ignorance?) - right clicking on empty space won't bring up "Open With..." list.
you can use 'next click' -> Open With...'

the pointer will turn into cross, then you can select directory.Image

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#4 Post by SFR »

darkcity wrote:
It's the matter of ROX (or my ignorance?) - right clicking on empty space won't bring up "Open With..." list.
you can use 'next click' -> Open With...'

the pointer will turn into cross, then you can select directory.Image
Oh, I didn't make myself clear enough. :oops:
The limitation I mean is that even with that 'cross' I can't point most-top folder, which is /, it works only with folders contained in /.

Thanks anyway :)
Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#5 Post by disciple »

If you wanted you could add a step in Multi-Paste where it tells you the path you have selected to Paste to, and allows you to edit that before starting the paste.

But maybe it is good to make it hard to paste into / - people should really keep their filesystems clean, after all.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#6 Post by Flash »

SFR, could you give an example of how this might be used? Thanks. :)

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#7 Post by SFR »

@disciple:
That would do the trick indeed, thanks!
But actually you're right about / - I can't recall a single time I needed to paste anything to /.
So, let's say it's not "a limitation" anymore, now it's "a feature". :wink:

@Flash:
The idea is to avoid annoying one-by-one copy/paste actions from several places to another several places.
Let's say I want to copy a few mp3s from one folder, a few from another one (and so on) to one, specific destination place.
Normaly I must open two ROX windows and do it by drag'n'dropping, for files in each folder individually...or worse, using right-click's copy, every single file individually!
Now it's enough to select few mp3s -> Multi-Copy (New), then go to another folder and select again with Multi-Copy (Add) and so on, and then navigate to destination place and use Multi-Paste.
All previously selected files will be pasted at once and everything can be done within one window.
Since I started to use this app I got used to it so much, that almost stopped to use in-built copy function, even for single files. :lol:

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

new feature

#8 Post by don570 »

It worked well when I tried it in the newest Exprimo by Pemasu 8)

A suggestion for a new feature:


Check if the file that is copied is null i.e. empty

Then when you paste that file ask the user if multiple copies
are desired (with different names of course)

I find that multiple copies of an empty file are useful when I test a script.

Here's a website that shows how to create multiple files with the
'touch' command
http://www.linuxnov.com/how-to-add-mult ... mand-line/

______________________________________________

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#9 Post by SFR »

Thanks for the feedback Don :)

As for the feature:
I'm not sure I fully get it :oops: , could you provide a specific example?

But I guess it's somehow related to your rename-files.pet, isn't it?
If I understand correctly the idea is to check a file, when copying, if it has 0 byte size, and then ask the user for multiplying it to the destination folder(s), using 'touch'.
If so, please don't get me wrong, but wouldn't be just easier to create a separate right-click app purposed to fill selected folder with given amount of empty files?
I imagine the core could look like:

Code: Select all

eval touch '"$filename"'_{1..$amount}.'"$extension"'
(Thanks for the link, by the way, didn't know that 'touch' can be used with {1..x})
or using /dev/urandom to create some random-named files, for testing purposes...

...unless I misunderstand. 8)

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

empty-files app

#10 Post by don570 »

I quickly wrote an app over the weekend to
make empty files

http://murga-linux.com/puppy/viewtopic. ... 790#616790

It could be of use for programmers.

_________________________________________________-

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#11 Post by don570 »

Image

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#12 Post by SFR »

Thank you, I'm starting to see the value of such option! :)

BTW, thanks very much for the info from your Rename-files thread.
the command mv -n
doesn't work on Puppy Linux (other than Lucid Puppy)
I_had_no_idea that there could be so cunningly hidden "little" differences (even on such basic levels) between Puppies!!! :shock:

Well, one must live long to learn. 8)

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#13 Post by disciple »

I'm starting to see the value of such option!
I think you were right before when you said it was more appropriate as a separate app. It's a completely different use case, only really useful for developers.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#14 Post by don570 »

I use it to quickly make some files to test programs,

but I've thought about a crude replacement of a database.

For instance a teacher has 30 students and they are numbered.

The teacher could quickly create 30 files in a folder and put
the exam results in the files.

_____________________________________________________

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#15 Post by disciple »

Interesting.
I think a singe spreadsheet would generally make a better database though.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#16 Post by SFR »

disciple wrote:
I'm starting to see the value of such option!
I think you were right before when you said it was more appropriate as a separate app. It's a completely different use case, only really useful for developers.
Yup, I'm still there; I meant 'option' in general, as an app.
...I failed again while Thought > Word (apparently I'm still in beta stage :oops:).

8)
Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#17 Post by disciple »

Users should also be aware of the drag and drop capability of Rox's copy and rename dialogues. As described in the comments at http://sourceforge.net/tracker/?func=de ... tid=357023
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#18 Post by saintless »

Hi, SFR :)

Thank you very much for this new option for Rox. It is exactly what I was wondering how to make possible. Your pet package saves me a lot of hard work which probably was going to reach a dead end.

I ask for your permission to include your scripts as a copy-paste option in a remastered version of Sickgut's Pussy-linux. Do you mind if I also do some small modifications with the paths inside the script?

Thanks again and best regards :)
Last edited by saintless on Sun 08 Jul 2012, 05:29, edited 1 time in total.

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#19 Post by SFR »

Hey Saintless, nice to see you! :)

Naturally, you can modify it as you wish and put wherever you want.
You didn't even have to ask, but it's nice of you.

And I'm glad you have found it useful.

Thanks & Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#20 Post by saintless »

Thanks, SFR, nice to see you too :)

The main town is much bigger than the village and it is like we don't go often in the same places but the important thing is we are here and we will meet again.

Cheers

Post Reply