Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

alex_a

macrumors newbie
Original poster
Jan 27, 2017
2
0
Spain
I've created an automator app to rename files in a folder (separate parts of the filename are changed using search and replace) - three renames are fixed, but the final one I wanted to use a variable. So the script:

1) asks for the text and saves it to a variable
2) does rename 1
3) does rename 2
4) does rename 3
5) does rename 4 using the variable

If I use only steps 1-4 it works great, but including step 5 makes the whole app not do anything. I included display steps to show the variable and make sure it was saved correctly and it is. So I don't understand why it's not working.

Greatly appreciate your help to solve this!
 

Attachments

  • Screen Shot 2017-01-27 at 21.06.15.png
    Screen Shot 2017-01-27 at 21.06.15.png
    119 KB · Views: 249
You can always create a workflow and give it some files to process. See if you get the results you expected in the Results section of every action.
  1. Get selected/specified Finder Items
  2. Do your stuff
  3. If everything works then remove step 1 and turn into application
 
You can always create a workflow and give it some files to process. See if you get the results you expected in the Results section of every action.
  1. Get selected/specified Finder Items
  2. Do your stuff
  3. If everything works then remove step 1 and turn into application

Seems the error was not adding a specific 'open folder' step. I thought I could just drag a folder onto the app which I had done with a previous version of the script (not using variable). having added that step, I now have to execute the app and tell it which folder to process, but it works fine.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.