Pass variable into Do Shell Script?

How do you pass a variable into a Do Shell Script? I want to itterate through a group of files in a loop and chmod each one to 777, but to do that I have to get the filepath into the Do Shell Script command.

I was trying this kind of thing (which doesn’t work!) …

Thanks!

[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]

I’ve managed to figure out that I should be doing something like this …

But it doesn’t work?! Any ideas please anyone?


[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]

Without seeing your code to know what the these_files list contains, I suspect it is a path type issue. By that I mean you are probably feeding the script a list of Mac style paths (or file references) instead of the POSIX file paths the shell script needs. If that is the case, this should work:

Jon


[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]

Thanks! That was it :slight_smile: