Topic: anyone know Applescript? (Page 1 of 1) |
|
---|---|
Maniac (V) Inmate From: there...no..there..... |
![]() I need a script that will set the permissions to every file in a given folder to 777. code: tell application "Finder" set theFolder to "/Users/Username/Desktop/myFolder " set theFiles to every file of theFolder repeat with a from 1 to length of theFiles chmod 777 end repeat end tell
code: on adding folder items to this_folder tell application "Finder" do script "chmod 777" end tell end adding folder items to
|
Maniac (V) Mad Scientist with Finglongers From: Germany |
![]() Does it have to be apple script? |
Maniac (V) Inmate From: there...no..there..... |
![]() ah. good call. Not sure why I didn't think of that. I need more sleep |
Maniac (V) Inmate From: there...no..there..... |
![]() actually come to think of it, yeah I guess it does need to be done in Applescript. Unless a bash script can just be double clicked on to run. I've done some bash scripts for mac before and it just opens in that stupid text editor. |
Maniac (V) Mad Scientist with Finglongers From: Germany |
![]() I'll have to look tomorrow (more like late tomorrow), but I'd assumed that if you set the execution bit on a text file created in some command line editor, it shouldn't open the text editor... |
Maniac (V) Inmate From: there...no..there..... |
![]() that's cool. It is no major rush. I appreciate your help |
Paranoid (IV) Inmate From: USA |
![]() I'm with TP on this one: did you remember to chmod +x your bash script? I'm pretty sure that it executes in the Finder if it's flagged as executable. |
Maniac (V) Mad Scientist with Finglongers From: Germany |
![]() Haven't had any luck getting the finder to run it - stil working on it, though. |
Maniac (V) Inmate From: Boston, MA, USA |
![]() Have you looked into the Automator application? Once you have launched the app, if you select Automator from the app list on the left, Run Shell Script is an option for that app. Might be what you need. |
Maniac (V) Mad Scientist From: :morF |
![]() Or you could just load up iTerm, and run the script... |
Paranoid (IV) Inmate From: USA |
![]() If only it were called iTerm... |
Maniac (V) Mad Scientist From: :morF |
![]() There's a terminal application for OS X called iTerm. I use it all day every day at work. |
Maniac (V) Inmate From: Boston, MA, USA |
![]() "Or you could just load up iTerm, and run the script..." |
Paranoid (IV) Inmate From: USA |
![]() quote:
|