View Full Version : Number of folder
Benjamin
3rd December 2008, 09:27
Hi all,
I am wondering if there is any way to count number of folders in a particular folder. I am not interested in counting sub folders.
Tnx,
Benjamin
LordQt
3rd December 2008, 10:33
Hello,
perhaps this is the way to go.
QDir folder = QDir(___PATH___);
folder.setFilter( QDir::Dirs | QDir::NoSymLinks);
QStringList dirListing= folder.entryList(QDir::NoDotAndDotDot | QDir::AllDirs);
after all you can use the function dirListing.count() to get the amount of the files in the specified dir.
use it witout any warranty I am a beginner ;O))
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.