I want to parse through a root folder which is entered by the user by using multi threading and multi processing at different versions.But how can I distinguish while I am parsing through a root folder whether the next is a folder or a file?To summarize I want to learn how I can distinguish the upcoming is a file or a folder.I wanna learn this because if it is a folder then I let opening this folder to a dynamically thread and/or process.If it is a file the existing thread or process can continue its work without any necessarity to create any different thread and/or process.I hope I can express my problem.I am waiting your answers.Thank you.

depends on the functions you are using to get the files in a folder. On MS-Windws using FindFirstFile() and FindNextFile(), see the fields in the WIN32_FIND_DATA structure. dwFileAttributes will tell you whether its a file or a folder.

Similar on *nix using opendir() and readdir() functions.