Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Create multiple folders from Terminal' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create multiple folders from Terminal
Authored by: BobHarris on Apr 26, '06 02:49:55PM

This is my 3rd attempt at getting this Applescript posted cleanly. First I lost the < because it looked like the start of an html tag. The 2nd time I lost the \'s and messed up the mkdir spelling. This time I'm just going to use Plain Old Text, and the heck with indentation and hope that line wrapping doesn't happen


-- AppleScript wrapper to execute UNIX shell scripts with a drag and drop interface.
-- Found basic script at http://MacOSXHints.com
-- Modified to Create directories from a list stored one per line in a file dropped on the script
-- script should handle spaces in name, apostrophes in names, etc...
-- Bob Harris 25-Apr-2006

on open filelist
repeat with afile in filelist
do shell script "while read DIR;do mkdir -p \"$DIR\";done <" & quoted form of POSIX path of afile
end repeat
end open



[ Reply to This | # ]