hey..will anyone tell me how to browse files and folders in a drive using C??

Two functions of dir.h header file namely findfirst and findnext are used to access the files/folders.

hey..will anyone tell me how to browse files and folders in a drive using C??

Depends on the operating system.

  • MS-Windows: FindFirstFile() and FindNextFile().
  • *nix: opedir(), readdir()

Google for those key words and you will find more information about how to use those functions.

thanks..worked..
suppose i want to make a window with a browse button that shows the list of files in a folder inside a list box ..is it possible in c?

Sure, if you reasonably proficient with the win32 API to do that with any random bunch of text strings.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.