a recent digital publishing workflow required the creation of over 90 folders (one for each chapter of the book) and each of these also had to include a ‘links’ folder. imagine trying to do that manually — over 90 folders.
this is a perfect job for an applescript droplet — drop a text file on the app and watch the folders appear — as if by magic :
this workflow starts with a comma delimited list of folder names. you could also use a tab delimited list. note: this version of the script does not handle returns (line breaks) in the list. the demo list looks like this :
you can get a copy of the CreateFolders app here
for those interested in this sort of thing…
this script shows one way to strip leading and trailing spaces from chunks of text. it uses two repeat while loops, each of which keep repeating for as long as the associated statement is true. the repeat loop ceases as soon as the statement is false, and the script moves on.
you could use the repeat until form instead :
repeat until mgThisItem does not start with ” ”
the last part of the script shows a simple, pure applescript way to create folders in the finder. the syntax is tortured and long-winded, but it works a treat. to learn how to create folders and folder hierarchies by scripting the shell, see nigel garvey’s excellent explanation at macscripter
update : if you are in the german or dutch regions you may find that your CSV files export as semi-colon separated (rather than comma separated). in which case you would replace this line :
set text item delimiters of AppleScript to ","
with this :
set text item delimiters of AppleScript to ";"
I’ve been trawling the web for a multiple folder generator and this looks like it fits the bill. Please can you send me a link to the script please, if possible … for filing boring accounts, invoices and receipts…
This is going to be a godsend for me! I have an excel list of my clients and would like to create a folder for each of them. It would be very time consuming for me to create all of them manually. Would love to have the script and save a ton of time. Thanks a lot!
I tried to post a comment and maybe I did but I can’t find it now. Anyhow, I’d like to try using this to create a whole bunch of folders for organizing my photos and if it works out, I’ll likely use it for my classes too later on.
I’m in California (bit early for you, sorry) and just need to create individual folders from a long spreadsheet of members of a non-profit. Was hoping to figure out how to avoid doing it all manually, which I probably could have done by now, the time it’s taken me to find your neat solution (I hope).
I work with a huge Classical music collection and would like to create folders with all the classical composers in order to place my digital files. Your gem will be very handy. Thanks in advance. Cheers
Wow….. i just did find your great work on this website!
A Mac-addict since 1990, starting with a Classic1 with 9inch dislplay, end moved up to the Imac.
Always searching for interesting stuff for trying on my dailly work at Prepress.
I would love to try some of your project scripts like the one above……
Got a few scripts coming your way Kumpel.
Nice to hear from another prepress dude.
Worked great for me – thanks a lot!
I work at an art collection and would like to generate a set of folders from an excel list of artist names in which to keep related documentation.
No worries — sending this through now.
Every so often one thinks – I wish I could do this voting repetitive task in an elegant way – looks like “create folders from list” will do this. I shoot concerts and need to quickly create a list of folders for the performer lists – do it using cut and paste. Want any images for you or you kids? email me phatfotos.co.uk
More elegance, less repetition — it’s what it’s all about.
What a great library you’ve got. I might hit you up later in the year if one of the kids ends up doing another carnival project.
Flicking that app to you now.
Have a good one.
I love this idea! I am a teacher and am trying to create folders for all of my 160 students. This folder script would save me valuable time. Can I have a copy?
Thanks in advance!
This one seems to be popular with teachers.
Coming at you now.
If possible I would like the CreateFolders.scpt to create folders from lists of items to be sorted on the Mac. Thanks.
No worries Tony.
Coming at ya.
This is just what I needed!! Thank you for saving me from writing this one myself!
Glad you found something useful here Arana.
Thanks for the feedback — much appreciated.
Have a good one.
Hey Macgrunt! I loved this post!! So useful!!! Thanks for sharing this!!!
Do you think it’s possible make one that would work with a .csv? for subfolders as well?
This is what I love about applescript — you come up with a solution for one problem, then somewhere down the line you use it to create another solution to a different problem. I decided that it’s such a good question, it should have its own post as a reply :-)+)
Thanks Jocely — hope that’s what you’re looking for