Advertisement
Tritonio

Remove substring from filenames recursively rename on Linux

Jan 1st, 2023
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. find . -iname "* (copy 1)*" -exec lua -e "os.execute('mv \"'..arg[1]..'\" \"'..string.gsub(arg[1],' %(copy 1%)','')..'\"')" - "{}" < /dev/null \;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement