1.11M Members

How to display the files in a specific folder?

 
0
 

I'm trying to make a little disk cleaner program and I couldn't figure out how to display the results of scanned directory on list view tool on windows form application. I have a 3 columns and these are File Name, Folder Path and File Size. I want the program to scan for example this location: C:\Users\Emre\AppData\Local\CrashDumps and display all of the files in that location on the list view tool. How could i do this? And how do display the file size and file location on the next 2 colomns and these other two colomns are sub items.

Thank you!

 
0
 

The header you're looking for is <dirent.h> , which allows you to use the opendir() function. That function opens a specific folder and allows you to iterate through all the files in that folder and view their names and sizes. If you look up tutorials on using that library, you'll find what you need.

 
0
 

That is for .net right? I'm using windows form applications and I need to display these files on a list view tool

 
0
 

You don't need .NET to use <dirent.h> . It's part of the standard C library.

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: