Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 01 Oct 2014, 08:51
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
Multi-Copy/Paste v2.2
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [30 Posts]   Goto page: 1, 2 Next
Author Message
SFR


Joined: 26 Oct 2011
Posts: 1072

PostPosted: Fri 23 Mar 2012, 18:34    Post subject:  Multi-Copy/Paste v2.2
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"

Greetings!
MultiCopyPaste-2.2.pet
Description 
pet

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

 Download 
Filename  MultiCopyPaste-1.1.pet 
Filesize  2.36 KB 
Downloaded  582 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 Sun 10 Aug 2014, 15:10; edited 5 times in total
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1072

PostPosted: 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
View user's profile Send private message 
darkcity


Joined: 23 May 2010
Posts: 2454
Location: near here

PostPosted: 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 | IF SendSpace link = "dead" THEN PM me ("up file to http://meownplanet.net/")
Back to top
View user's profile Send private message Visit poster's website 
SFR


Joined: 26 Oct 2011
Posts: 1072

PostPosted: 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. Embarassed
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 Smile
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
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6439
Location: Auckland, New Zealand

PostPosted: 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.

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11081
Location: Arizona USA

PostPosted: Fri 30 Mar 2012, 00:49    Post subject:  

SFR, could you give an example of how this might be used? Thanks. Smile
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1072

PostPosted: 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". 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. Laughing

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
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 3307
Location: Ontario

PostPosted: Sat 31 Mar 2012, 16:18    Post subject: new feature  

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

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
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1072

PostPosted: Sun 01 Apr 2012, 12:52    Post subject:  

Thanks for the feedback Don Smile

As for the feature:
I'm not sure I fully get it Embarassed , 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. Cool

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
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 3307
Location: Ontario

PostPosted: 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
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 3307
Location: Ontario

PostPosted: Mon 02 Apr 2012, 17:37    Post subject:  

Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1072

PostPosted: Mon 02 Apr 2012, 18:00    Post subject:  

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

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!!! Shocked

Well, one must live long to learn. Cool

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
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6439
Location: Auckland, New Zealand

PostPosted: 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.

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 3307
Location: Ontario

PostPosted: 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
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6439
Location: Auckland, New Zealand

PostPosted: Tue 03 Apr 2012, 16:54    Post subject:  

Interesting.
I think a singe spreadsheet would generally make a better database though.

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [30 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1006s ][ Queries: 12 (0.0087s) ][ GZIP on ]