Windows – script for win/dos to create folders from list of names in a file

directoryscriptingwindows

Scripting question. Dang, it should be easier than this. I have a file with a list of names. I'd like to turn those names into folders. Whenever I try the FOR loop, all I get is the name of the file I want to read from being created as a folder, not the contents of the file being turned into folders. Just want to mkdir for each item in the list.

Best Answer

One way is to open the list of names in word and do copy and replace. Replace ^p with ^pmkdir this will replace all carraige returns (^p) with a carriage return and the mkdir command. Then save it as a bat and run it. There's def a cleaner way to do this if its going to be used over and over, but this is quick quick.