I have a few files that I would like to name (many to do it manually), usually I Automator but the thing is that I need another file, which must be said before the file, but instead of this is my File is by now and similarly, but I would like to change their name for something like Anyway to do this with Automator? Ask because I'm actually using the automator really, which means that I'm not really that you tell a specialist. Edit: This is what I am trying to achieve: Here's the way to increase the level of genericity in Bash. You probably do not care about the first two because it has hardcoded yyy and zzz, but I did it to show you a little to understand the third. There should be several other methods of course with other commands. You will get unimportant errors because the MV happens twice on the whole batch. 2
1
xxx - 401a - yyy.zzz xxx - 401b - yyy.zzz xxx - 402a - yyy.zzz xxx - 402b - yyy.zzz xxx - 403a - yyy. Zzz
xxx - 401-pt1.zzz xxx - 401-pt2 . Zzz xxx - 402-pt1.zzz xxx - 402-pt2.zzz xxx - 403-pt1.zzz
in the file *; Do mv "$ file" "$ (echo $ file | sed 's / a - yyy / -pt1 / g')"; MV "$ file" "$ (resonance file | sad / b - yyy / -pt2 / g ')"; File * for; Do mv "$ file" "$ (echo $ file | sed 's / a - * .zzz / -pt1.zzz / g')"; MV "$ file" "$ (echo $ file | sed 's / b - * .zzz / -pt2.zzz / g')"; File * for; Do mv "$ file" "$ (echo $ file | sed -r 's / a -. *. ([A-z] {3}) / - pt1. \ 1 /')"; Mv "$ file" "$ (echo $ file | sed -r 's / b - *. ([A-z] {3}) / - pt2. \ 1 /')"; Done
No comments:
Post a Comment