Author |
Message |
SFR

Joined: 26 Oct 2011 Posts: 1749
|
Posted: Fri 23 Mar 2012, 18:34 Post subject:
Multi-Copy/Paste v3.0 Subject description: Multiple copying using ROX context-menu; a substitute. |
|
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!
 |
Description |
MD5: e265ee883280b43fdb728442d7e39c23 multicopypaste-3.0.pet
|

Download |
Filename |
multicopypaste-3.0.pet |
Filesize |
32.74 KB |
Downloaded |
294 Time(s) |
Description |
|

Download |
Filename |
MultiCopyPaste-2.2.pet |
Filesize |
13.15 KB |
Downloaded |
728 Time(s) |
Description |
Multi-Copy/Paste v1.1
|

Download |
Filename |
MultiCopyPaste-1.1.pet |
Filesize |
2.36 KB |
Downloaded |
974 Time(s) |
_________________ [O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Last edited by SFR on Mon 12 Dec 2016, 14:11; edited 6 times in total
|
Back to top
|
|
 |
SFR

Joined: 26 Oct 2011 Posts: 1749
|
Posted: Sun 25 Mar 2012, 18:21 Post subject:
|
|
Tiny update:
- Displays short usage instruction during installation.
- If there were copying errors, opportunity to delete source objects is disabled.
First post updated.
Greetings!
_________________ [O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
|
Back to top
|
|
 |
darkcity

Joined: 23 May 2010 Posts: 2549 Location: near here
|
Posted: Sun 25 Mar 2012, 18:42 Post subject:
|
|
Quote: | 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.
_________________ helping Wiki for help
|
Back to top
|
|
 |
SFR

Joined: 26 Oct 2011 Posts: 1749
|
Posted: Sun 25 Mar 2012, 18:59 Post subject:
|
|
darkcity wrote: | Quote: | 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. |
Oh, I didn't make myself clear enough.
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!
_________________ [O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6991 Location: Auckland, New Zealand
|
Posted: Thu 29 Mar 2012, 22:58 Post subject:
|
|
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
|
Back to top
|
|
 |
Flash
Official Dog Handler

Joined: 04 May 2005 Posts: 13386 Location: Arizona USA
|
Posted: Fri 30 Mar 2012, 00:49 Post subject:
|
|
SFR, could you give an example of how this might be used? Thanks.
|
Back to top
|
|
 |
SFR

Joined: 26 Oct 2011 Posts: 1749
|
Posted: Fri 30 Mar 2012, 05:35 Post subject:
|
|
@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".
@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.
Greetings!
_________________ [O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 5384 Location: Ontario
|
Posted: Sat 31 Mar 2012, 16:18 Post subject:
new feature |
|
It worked well when I tried it in the newest Exprimo by Pemasu
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-multiple-files-using-touch-command-line/
______________________________________________
|
Back to top
|
|
 |
SFR

Joined: 26 Oct 2011 Posts: 1749
|
Posted: Sun 01 Apr 2012, 12:52 Post subject:
|
|
Thanks for the feedback Don
As for the feature:
I'm not sure I fully get it , 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: | 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.
Greetings!
_________________ [O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 5384 Location: Ontario
|
Posted: Mon 02 Apr 2012, 17:27 Post subject:
empty-files app |
|
I quickly wrote an app over the weekend to
make empty files
http://murga-linux.com/puppy/viewtopic.php?p=616790#616790
It could be of use for programmers.
_________________________________________________-
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 5384 Location: Ontario
|
Posted: Mon 02 Apr 2012, 17:37 Post subject:
|
|
|
Back to top
|
|
 |
SFR

Joined: 26 Oct 2011 Posts: 1749
|
Posted: Mon 02 Apr 2012, 18:00 Post subject:
|
|
Thank you, I'm starting to see the value of such option!
BTW, thanks very much for the info from your Rename-files thread.
Quote: | 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!!!
Well, one must live long to learn.
Greetings!
_________________ [O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6991 Location: Auckland, New Zealand
|
Posted: Mon 02 Apr 2012, 19:41 Post subject:
|
|
Quote: | 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
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 5384 Location: Ontario
|
Posted: Tue 03 Apr 2012, 12:04 Post subject:
|
|
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.
_____________________________________________________
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6991 Location: Auckland, New Zealand
|
Posted: Tue 03 Apr 2012, 16:54 Post subject:
|
|
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
|
Back to top
|
|
 |
|