Resolved [Q] AppleScript, a folder, and commands before each path of a file from said folder

Discussion in 'Mac Programming' started by Jessica Lares, May 5, 2015.

  1. Jessica Lares, May 5, 2015
    Last edited: May 6, 2015

    Jessica Lares macrumors G3

    Jessica Lares

    Joined:
    Oct 31, 2009
    Location:
    Near Dallas, Texas, USA
    #1
    So basically, I want to have a little button/have it in the menu in Finder, that when I press it, takes whatever folder I'm in, grabs the path of all the files in said folder, and adds a command with options before it, and runs it in Terminal.

    So its end output is basically:

    Code:
    blahblah -t -6 /Users/jessicalares/Desktop/textexample1.md
    blahblah -t -6 /Users/jessicalares/Desktop/textexample2.md
    blahblah -t -6 /Users/jessicalares/Desktop/textexample3.md
    And so on.

    I know how to pull the paths from Finder, and I know how to run a script, but I don't know how to combine the two together to get what I want.
     
  2. Jessica Lares thread starter macrumors G3

    Jessica Lares

    Joined:
    Oct 31, 2009
    Location:
    Near Dallas, Texas, USA
    #2
    Figured it out, and ended up just doing it in Automator with the shell script action. :cool:
     

Share This Page