Topic: anyone know Applescript? (Page 1 of 1) |
|
---|---|
Maniac (V) Inmate From: there...no..there..... |
posted 02-07-2007 15:21
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 |
posted 02-07-2007 17:59
Does it have to be apple script? |
Maniac (V) Inmate From: there...no..there..... |
posted 02-07-2007 22:31
ah. good call. Not sure why I didn't think of that. I need more sleep |
Maniac (V) Inmate From: there...no..there..... |
posted 02-07-2007 23:06
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 |
posted 02-07-2007 23:29
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..... |
posted 02-08-2007 15:41
that's cool. It is no major rush. I appreciate your help |
Paranoid (IV) Inmate From: USA |
posted 02-13-2007 06:21
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 |
posted 02-13-2007 09:15
Haven't had any luck getting the finder to run it - stil working on it, though. |
Maniac (V) Inmate From: Boston, MA, USA |
posted 02-13-2007 13:17
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 |
posted 02-14-2007 07:35
Or you could just load up iTerm, and run the script... |
Paranoid (IV) Inmate From: USA |
posted 02-14-2007 07:40
If only it were called iTerm... |
Maniac (V) Mad Scientist From: :morF |
posted 02-14-2007 12:21
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 |
posted 02-14-2007 23:04
"Or you could just load up iTerm, and run the script..." |
Paranoid (IV) Inmate From: USA |
posted 02-15-2007 14:42
quote:
|