I've inherited some shell scripts that trigger via Launch Control for OSX. I'm trying to add a script of my own that - whenever a folder is added to a specific directory - will rename the files inside those folders based on specific criteria.
As examples, I need the following renames to occur whenever necessary:
123456_LK.tif = 123456_standard.tif
123456_ALT1.tif = 123456_alternate1.tif
The problem is that I have a script that will perform this renaming if I run it in Terminal, but in Launch Control is just won't work. Does anyone have any experience using this app? I've copied the current entries in the app that work and have just targeted my own script but I can't get it to work.
Here is the line that renames the standard files:
#!/bin/bash find /Volumes/COMMON-LIC-PHOTO/ASPERA/ASPERA_STAGING -mindepth 2 -type f -exec rename -v 's/([0-9]*)_LK/$1_standard/' \;
In Launch Control the entry status is OK and returns no errors, and yet the files do not get renamed. I've tried using rename (which I don't think is supported) and mv - neither work in the various ways I tried them,