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!

Edited by emreozpalamutcu: n/a

6 Years
Discussion Span
Last Post by Tumlee

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.


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

This topic has been dead for over six months. 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.