I’ve got a bunch of subdirectories with a couple thousand PNG files that will be sent through Photoshop, creating PSD files. Photoshop can only output those to a single folder, and I want to move each one back to their original directory – so the new file foo_bar_0005.psd should go to where foo_bar_0005.png already is. Every filename only exists once.
Can somebody help me with this? I’m on OSX.
2
Answers
Each file found with this
find
is piped to a Bash command that successively make the psd conversion and move the .psd to the .png original directory.The echo are here to give you an overview of the result.
You should remove them to launch the real photoshop command.
You might start from this minimal script:
But note that this script doesn’t include any error handlers e.g. file collision issue, file not found issue, etc.