Q: Help required in Apple Script / Automator
Hi All,
I am in the process of renaming/ organizing and sorting wav files for processing wav files in Apple Loops Utility to finally covert them to Apple Loops and import them into logic pro.
this is my workflow process :
PART 1 (Rename in sub folders by taking folder name)
I get a key file that tells me which key the parent folder and respective files are in.
the wav files we need to work on are in nested folders- so for eg Under TECHNO 130 BPM (PARENT FOLDER) we have BASS (SUB FOLDER1) / Strings (sub folder 2) etc.
Each sub folder will have various wav files- For eg the BASS folder will have files Strong Bass 1.wav Strong Bass 2.wav etc.
I need to rename the files in each subfolder taking the name of that folder.
So for eg all the files in the BASS folder will take the name (as per above example) BASS Strong Bass 1.wav.
all Files in STRINGS folder will add Strings (Filename ).wav and so on and so forth will all additional folders.
(I have succeeded in making this in Automator, but I have to do this manually but one sub folder at a time.)
PART 2 (move files from sub folders to Parent folder and delete sub folders)
After renaming : All the files in these sub folders should automatically move to a common folder for renaming again and sorting and classification and the files should move out of their sub folders to parent folder. So all files in BASS / Strings will now move to TECHNO 130 BPM. The Sub folders after this move will get deleted and all the files will be there in their now now renamed avatars.
(again I have managed to do this with automator)
PART 3 Renaming / Sorting to sub folders Again :-)
The name of the file also gives me an indicative of the key the file is in ( for eg BASS Strong bass 1) so here the 1 will represent CMAJOR or C Minor.
So my files again have to be renamed as per type :
so The first decision tree Popup Should Ask the Key :1. MAJOR / 2. MINOR / 3. ALL MINOR
If my answer is 1. Major
it should automatically take all file names ending with 1 and rename the 1 to CMAJ ( for eg BASS Strong Bass 1.wav will now rename to BASS Strong Bass CMAJ.wav)
So in the 1. MAJOR
1 will Change to C MAJ
2 will change to D min
3 will change to E min
4 Will Change to F MAJ
5 will Change to G maj
6 will Change to Amin
7 will change to B MAJ
These files will then be sorted / filtered and moved to nested folders called CMAJ / D min / E min / F Maj / G maj / A min / B Maj respectively under the parent folder MAJOR.
In 2. MINOR we have two choices 1. Harmonic Minor 2 Melodic Minor
Based on this choice
Under Harmonic Minor
1 will change to Cmin
2 will change to Dmin
3 will Change to Eb Major
4 Will change to F Min
5 will change to G Maj
6 Will change to Ab Major
7. Will change to Bb Major
These files will then be sorted / filtered and moved to nested folders called Cmin / Dmin / EbMaj / Fmin / G Maj / Ab Maj / B b Maj respectively under the parent folder Harmonic Minor
Under Melodic Minor :
1 will change to Amin
2 will change to Bmin
3 will change to Cmaj
4 will change to Dmin
5 Will change to Emaj
6 will change to F maj
7 will change to Gmaj
These files will then be sorted / filtered and moved to nested folders called Amin / Bmin / CMaj / Dmin / E Maj / F Maj / G Maj respectively under the parent folder Melodic Minor
In Option 3. All Minor
the files get renamed and sorted as follows :
1
1 will change to Amin
2 will change to Bmin
3 will change to C Min
4 will change to Dmin
5 Will change to EMin
6 will change to F Min
7 will change to G Min
These files will then be sorted / filtered and moved to nested folders called Amin / Bmin / CMin / Dmin / E MIn / F Min / G Min respectively under the parent folder Melodic Minor
I now request any of the applescript / automator Gurus out there to make this possible.
Once i Understand the scripting / automator processed I can tweak it further for my own additional requirements.
Thanks in advance :-)
Cheers
Ajay
MacBook Pro, Mac OS X (10.6.8)
Posted on Jun 1, 2016 1:12 AM