Create nested folders from text file


#1

I need to create a set of nested folders, and I remember seeing something once that would let me create a text file listing them, and then automatically create the folders. (I thought it was something Brett Terpstra did, but I’ve searched on his site and can’t find it.)

Does this sound familiar? I believe there is a command to run in terminal that references the text file …

thanks!
Fran


#2

Try this:


#3

and just to be difficult :wink: I do this in BBEdit with “Shell worksheet” and grep.

given an empty directory

mkdir -p foo/bar/one
mkdir -p bar/foo/one

results in:

./
-- foo/
-- -- bar/
-- -- -- one/
-- bar/
-- -- foo/
-- -- -- two/

The advantage to BBEdit in this case is I have all the GUI goodies of BBEdit’s text processing and then, when I have everything just so, ⌘-A, [ENTER] and it is all done.


#4

I think this is it…

Used to use it to generate pre-populated theme templates for Statamic CMS