Getting filenames inside a folder

Post » Wed Jan 05, 2011 6:10 am

I would like to collect and store the names of all folders located within a specific folder into an array. These folders themselves could also contain files. The main folder could look like:

\mainfolder\folder1\file1\mainfolder\folder2 (empty)\mainfolder\folder3\file2\mainfolder\folder3\file3

This should result in an array with 3 string elements (folder1, folder2 and folder3). In specific I would like to know how to collect these folders, so I can store them in an array. Any suggestions would be appreciated. Thanks in advance.
User avatar
Chloe Yarnall
 
Posts: 3461
Joined: Sun Oct 08, 2006 3:26 am

Return to IV - Oblivion

cron