Tool to rename lots of files and folders using a text editor with a "diff" view to compare currents and targets paths. For now it only works with VSCode but I plan to add the support of others/custom text editors.
$ diffren use-editor <TEXT_EDITOR>
<TEXT_EDITOR>
Possible values:vscode
,vscodium
,custom
.
$ diffren use-editor vscodium
The editor to use is now: VSCodium
$ diffren set-custom-editor <COMMAND>
<COMMAND>
The command to start the custom editor, with{target}
that'll be replaced by the path to the file containing the target names to rename files to, and optionnally{current}
that contains the current names to rename files from.
$ diffren set-custom-editor "vscode --wait --diff {current} {target}"
The custom editor launch command has been set with:
> vscode --wait --diff {current} {target}
$ diffren get-config
diffren run [PATHS]...
[PATHS]...
: Path(s) of the files to list. Unix shell style patterns are supported. Defaults to*
.
$ ls Chill\ Bump*
Chill Bump - Back to the Grain:
01 - Chill Bump - Matter of Choice (Intro).opus 04 - Chill Bump - Leakin'.opus
02 - Chill Bump - No Pressure.opus 05 - Chill Bump - Occupy (99%).opus
03 - Chill Bump - Watch Me Score Points.opus 06 - Chill Bump - It's Alive !.opus
Chill Bump - Starting From Scratch:
01 - Chill Bump - Lost in the Sound.opus 04 - Chill Bump - Water Boycotter.opus
02 - Chill Bump - My Mother Is a Pornstar.opus 05 - Chill Bump - Snip Snip.opus
03 - Chill Bump - The Smell of Beer (interlude).opus
$ diffren run Chill\ Bump*/*
It will open a VSCode window with the current file names on the left, and the target file names on the right:
You edit the file on the right to plan the renamings:
Save the file and close it.
diffren (still running in the terminal) will now ask you to confirm the changes :
Confirm will apply the renamings and shows a recap: