3

I have Windows 7 (English) and I want to create many folders from a text with Greeks names (I'm Greek).

Do you know any program (especially freeware) or a command line trick to get my job done ? Thank you very much.

2 Answers 2

8

You could do this with the FOR command in dos calling MD to create directories:

Example. Create a text file with a folder name on each line, and save as test.txt then on the command line run:

for /F %i in (test.txt) do md %i

or, if you want to take spaces into account:

for /F "usebackq delims=" %i in (test.txt) do md "%i"

Not sure if Greek names require unicode, and how the above would be affected by that though.


3
  • 1
    I found a little GUI prog, and it seems (from the forum of the prog) that its a wrapper of the above command line made with AutoHotKey. Its called "Text 2 Folders" and you can find it at skwire.dcmembers.com/wb/pages/software/text-2-folders.php. I works for Greek chars. Thanks for the help !!!
    – labmice
    Aug 13, 2010 at 8:00
  • 3
    That should be: FOR /F %i in (test.txt) do md "%i" If any folder name has a space, not having it in quotes will cause multiple folders (one for each word) to be created. Putting the %i in quotes ensures you get the actual folder name you wanted. Aug 13, 2010 at 9:01
  • Please update above as I made it a wiki Aug 17, 2010 at 4:00
5

Open notepad and paste the following into it:

mkdir test
mkdir test1
mkdir test2
mkdir test3

If the folder name is to contain a space or dash etc, then use " " at either end - like this:

mkdir "test folder 1"
mkdir "test folder 2"
mkdir "test folder 3"
mkdir "test folder 4"

Save the file with the name "WhateverYouWant.bat"

Name the file whatever you want to name it. The important thing is that it ends in .bat

Now double click the file you just made.

This example should create 4 folders named test, test1, test2, and test3.

Now, just replace test, test1, etc. with the names you'd like the folders to have. There's no limit to the number of lines you can have in the .bat file, so go crazy!

Not the answer you're looking for? Browse other questions tagged .