First Real Project... How to I query filesystem for directory / file info
Total beginner here :) Been on a course which is all well and good but now I have to actually do something more worthwhile :)
The app I am working on will be based on the abilty to take a folder or drive, and query it and all subdirectories for information. It is a cleanup process to get rid of all directories and contents based on the size of the top level directory.
So I have a drive with circa 20000 directories. I need to find all directories where size of contents is less than (for example) 1mb... then delete them. These directories could be empty, they could be 7 or 8 levels deep with various small files in so the process needs to be flexible in that regard.
So step 1. What API can I use to query the directory structure (starting from a path given as a variable of course) and get information such as name, size, contents etc
Step 2 will be to present this in a report format
Step 3 will be to execute the deletions based on the data received (possibly with the option to exclude some paths via a checkbox or something)
Right now I am stuck on Step 1 :) So please any help is appreciated!

