How To Create Folders

I have a txt file.
I can read the file line by line. http://www.cplusplus.com/doc/tutorial/files/

BUT
How can I create folders?
I would like to create folders that way
that each line read in
should be
the name of each folder created.

That is lines in TXT files should be the names of the folders.

Any idea?

Last edited on
Should be:

mkdir();
Thanks. It works.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <iostream>
#include <string>
#include <direct.h>
using namespace std;


int main ()
{
    cout<<"New Folder Creation..."<<endl;

    string dirName="I'm a new Folder";

    // http://www.cplusplus.com/reference/string/string/c_str/
    mkdir( dirName.c_str() );

    cout<<"New Folder Created..."<<endl<<endl;;

    return 0;
}



Last edited on
Topic archived. No new replies allowed.