i did it. Using this i am able to generate list of all files and folders of a drive in text file.
But i have two problems
1. I have to changedirectry myself. It does not get drive names itself and generate list.
2. This program is based on command prompt(dir command).
>>Be warned that scanning a drive for all files and directories will take a while, depending on how much stuff you have on there.
On my 500GB SATA-HDD/7200rpm it took a whooping 30mins(I caught up with a sitcom meanwhile). Then I made it multi-threaded, could barely catch 5 minutes of the show. :)
>>5 minutes still isn't exactly instant though
I have a bulky C drive, only 1GB ram. C'mon give the poor threads some credit. :P
>>op should probably not use the DIR system command, but switch to using the FindFirstFile function
system()/shell calls, will take centuries if not ages to scan a 500GB HDD, I on the other hand used the FindFirstFile.