I am attempting to rename a directory full of files based off the contents of two text files. OLD
(which has the full names of the current files) and NEW
(which has the names i wish to rename them) both in the same order.
How would I go about renaming the files from OLD
to NEW
?
Each file contains \n
separated name
OLD example line: Blah Blah Blah Campaign 2 Episode 1.mp4
NEW example line: Campaign 2 Episode 1.mp4
"A Dangerous Chase _ Critical Role _ Campaign 2, Episode 64-3yfLht7w7Yk.mp4" "A Favor in Kind _ Critical Role _ Campaign 2, Episode 16-lT-wFK4SgJc.mp4" "A Game of Names _ Critical Role _ Campaign 2, Episode 49-TBw3AGBI6s4.mp4" "Agreements _ Critical Role _ Campaign 2, Episode 61-Ck_yuplT8O8.mp4" "A Hole In the Plan _ Critical Role _ Campaign 2, Episode 42-758doI6FhA0.mp4"
– Hirschy Nov 28 '19 at 04:00