PDA

View Full Version : Create folder at specfic path on runtime



anh5kor
19th January 2016, 09:27
How to create a folder at specific path
Eg:
I want to create a folder at location : D:/Polyspace/Source.
On above path my program should create a folder with some specific name

I tried the below code but its not working



QString path = "D:/Polyspace/Source";
QDir dir(path);
if (!dir.exists()){
dir.mkdir("NewFolder");
}

Lesiok
19th January 2016, 09:58
Use QDir::mkpath not QDir::mkdir

yeye_olive
19th January 2016, 10:01
Please do not open several threads asking the same question. I posted a reply in your other thread.