Make Concurrent Copies (and optionally label the versions)
Posted: Wed 27 Jan 2016, 05:47
new subtitle to reflectupdate, this is the thread formerly subtitled "now as a pet and with more options and icons (lightweight labels)"
___________
i've changed the thread title from Easily Add Multi-Copy Ability To Your Pup to match the pet and avoid confusion with SFR's MultiCopyPaste-2.2; this is the thread originally subtitled Rox right-click, drag and drop, call through a terminal, add to a script) and then now (somewhat) improved as Make_Concurrent_Copies. see thepet in the linked/last post for current version.
_________
new and improved /shiny (older)
The following script will allow you to easily make multiple copies of files or directories and edit their count, and to some degree, the wording of the copies (presets are for sets of three and five starting as file2X.1--the dummy extension is so you can easily swap in actual extensions or delete them (easier to delete from the template than add the extension after the fact). rox's built in bulk rename function (access with a right click) will allow text replacement, positional addition, and selective deletion, but you can further fine tune the final names with SFR's Multi-Rename or whatever bulk renamer comes with your pup (usually gfnrename or prename)).
The script places three desktop files in two folders used by rox for right click functions. the one that's accessible in the New menu will create two files in whatever folder it's clicked or activated. one is Make_Copies--edit_range, which opens the drag and drop file (Make_Copies) for you to edit. they're disposable and can be renamed and modified for portable use. the other two are in the Open With menu, which allows them to function as right click utilities--right click an item (file of folder--it updates and overwrites recursively so make sure you don't have identically oddly named files hanging about when you activate it if you want to keep older versions) and pick either 3 or 5c, both of which you can access for editing (or copy and alter to add other presets) by right click > Open With... > Customise. 5c (or 3c) /path/to/file will make multiple copies of the file according to the presets. entering 5ce (5c, edit) into a terminal will create the scripts Make_Copies and Make_Copies--edit_range in your current directory. "edit range" is set to open the other document in leafpad--you can adjust the script and watch it create the files, altering as necessary. if you edit the desktop files in geany, you can right click open (or shift plus control plus o) the target (which isn't as convenient as 5ce).
it's working well. wish i needed to copy more stuff.
___________
i've changed the thread title from Easily Add Multi-Copy Ability To Your Pup to match the pet and avoid confusion with SFR's MultiCopyPaste-2.2; this is the thread originally subtitled Rox right-click, drag and drop, call through a terminal, add to a script) and then now (somewhat) improved as Make_Concurrent_Copies. see thepet in the linked/last post for current version.
_________
new and improved /shiny (older)
The following script will allow you to easily make multiple copies of files or directories and edit their count, and to some degree, the wording of the copies (presets are for sets of three and five starting as file2X.1--the dummy extension is so you can easily swap in actual extensions or delete them (easier to delete from the template than add the extension after the fact). rox's built in bulk rename function (access with a right click) will allow text replacement, positional addition, and selective deletion, but you can further fine tune the final names with SFR's Multi-Rename or whatever bulk renamer comes with your pup (usually gfnrename or prename)).
Code: Select all
#!/bin/sh
echo $'
#!/bin/sh
echo $\'
#!/bin/sh
for f in "$@"{2..6}.X ; do cp -fRu "$@" $f ; done
#replace the .X with an extension or delete it.
#eg: {x..y[..incr]}{AA..ZZ..5}{x..a} {x..a..-2}
\' > ./Make_Copies
echo $\'
#!/bin/sh
leafpad ./Make_Copies
\' > ./Make_Copies--edit_range
chmod 755 ./Make_Copies--edit_range ./Make_Copies
' > /root/my-applications/bin/5ce
chmod 755 /root/my-applications/bin/5ce
echo $'
[Desktop Entry]
Encoding=UTF-8
Name=
Icon=/root/puppy-reference/mini-icons/mini-pencil.xpm
Comment=make multiple copies of a file by drag and drop
Exec=/root/my-applications/bin/5ce
Terminal=false
Type=Application
GenericName=
Version=1.0
Categories=Utility
' > /root/.config/rox.sourceforge.net/Templates/5ce
echo $'
[Desktop Entry]
Encoding=UTF-8
Name=
Icon=/root/puppy-reference/mini-icons/mini-penguin.xpm
Comment=make multiple copies of a file by drag and drop
Exec=/root/my-applications/bin/5c
Terminal=false
Type=Application
GenericName=
Version=1.0
Categories=Utility
' > /root/.config/rox.sourceforge.net/SendTo/5c
echo $'
[Desktop Entry]
Encoding=UTF-8
Name=
Icon=/root/puppy-reference/mini-icons/mini-penguin.xpm
Comment=make multiple copies of a file by drag and drop
Exec=/root/my-applications/bin/3c
Terminal=false
Type=Application
GenericName=
Version=1.0
Categories=Utility
' > /root/.config/rox.sourceforge.net/SendTo/3c
echo $'
#!/bin/sh
for f in "$@"{2..6}.X ; do cp -fRu "$@" $f ; done
#replace the .X with an extension or delete it.
#eg: {x..y[..incr]}{AA..ZZ..5}{x..a} {x..a..-2}
' > /root/my-applications/bin/5c
echo $'
#!/bin/sh
for f in "$@"{2..4}.X ; do cp -fRu "$@" $f ; done
#replace the .X with an extension or delete it.
#eg: {x..y[..incr]}{AA..ZZ..5}{x..a} {x..a..-2}
' > /root/my-applications/bin/3c
chmod 755 /root/my-applications/bin/3c /root/my-applications/bin/5c
it's working well. wish i needed to copy more stuff.