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: wendo on Apr 25, '06 08:11:29AM

it is possible to create multiple folders from a list in a file, you will just need to use an additional UNIX command, xargs. for example:
% cat file_names
folder1
folder2
folder3
%cat file_names | xargs -i mkdir \{\}
% ls | grep folder
folder1
folder2
folder3
%
Note, this was tested on Solaris (don't have access to a mac right now), so the syntax might be slightly different. i'm not sure if the -i is necessary or not. also, i use tcsh, so the backslashes (\) escape the shell for the curly brackets ({}). depending on what shell you use, you may or may not need these.



[ Reply to This | # ]