3
Contributors
5
Replies
6
Views
9 Years
Discussion Span
Last Post by DangerDev
0
cd \
dir /s

:)

How do you want the files? Name only or with path. What os are you using?

Edited by Nick Evan: n/a

0

i need c++ code to list all files in windows platform.......

second thing...i need to store all the information abt files along with path into temporary file

0

The (by far) easiest way to do this is really:

int main()
{
    system("cd\\");
    system("dir /s > temp.txt");
}

and all the details are in temp.txt. :)

But if you want to do it the right way, you might want to look at FindFirst() and FindNext().

Edited by Nick Evan: n/a

0

along with findfrst and findnext method suggested by Niek use recursion to get list of all files from harddisk

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.