1

I want my script to recursively rename all .mov files to _Proxy.mov, BUT I also want it to SKIP any files already named _Proxy.mov. The below command is still renaming all .mov files, and is ignoring the negate function !.

find . -name '*.mov' ! -name ‘*_Proxy.mov’ -exec bash -c 'mv "$0" "${0%\.mov}_Proxy.mov"' {} \;
2

1 Answer 1

0

The issue was the curly quotes. Once replaced the code works perfectly

1
  • What is the proper command syntax that you were missing? That would make this an answer. Please keep in mind the goal of each question on this site is that you get your answer, AND that others having the same issue can find and understand and apply the answer too. Commented Dec 24, 2022 at 2:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .