RenameFromClipboard - a script command, which renames selected items by fetching text/item-names from the clipboard.
This can be very handy in case you want to rename a bunch of mp3 files, for which you already have a beautyful list of names (from an online source maybe). Another use case is updating a lot of files and folder names from a similar folder containing basically the same but differently named items.
- detects multiline clipboard content and takes care of different line endings (CR vs. CR+LF etc.)
- validates and shapes the clipboard content before it's used to rename items (not idiotproof yet, so don't use binary code for renaming o)
- warns you if the number of selected items does not match the number of items in the clipboard
- supports following placeholders to increase flexibility, moving of files is a usecase for that e.g.
- %item.realpath%", %item.name%", %item.name_stem%", %item.path%", %item.ext%"
- %item.new_realpath%, %item.new_name%", %item.new_path%, %item.new_ext%"
- The default operation using these is Rename FROM="%item.realpath%" TO="%item.new_name%"
- can run multiple commands (default is "Rename" only, edit script config or use COMMANDS param to set additonal params and add commands)
- you can use plain-text directly or files and folders currently in the clipboard (these will be converted by DO to paths and names automatically)
- safemode for testing and watching results on the consoleParameters:
- QUIET (avoid confirmation if number of selected items does not match number of items in clipboard)
- DESELECT (deselect renamed items)
- SAFEMODE (do not run any operation, for testing and previewing actions on the console)
- COMMANDS (any dopus commands to replace/change the default rename operation, use "\n" to separate them here, param must be last)Demo:
Crappy filenames in dopus:
Nice file names in editor (copied to clipboard):
Nice file names in DOpus after selecting the crappy mess and running "RenameFromClipboard":Installation:
To install the command, download the *.js.txt file below and drag it to Preferences / Toolbars / Scripts
Create a button or hotkey with the command "RenameFromClipboard" and it's ready to go with the defaults.
Select and copy text or files/folders from any place. Select the items to rename in dopus and eventually use your new button/menu entry.
Have fun with it, I hope it's useful for somebody. Bug reports and suggestions are welcome of course! o)