this is my first post here on the site :)
So basically I need a gui application that can create and save XML file containing complete hierarchy of files and folders for a specified folder.
1.Each folder should be qualified with: Folder name, Folder size (bytes) and Number of files.
2.Each file should be qualified with: File name, File size (bytes), File creation, File last access time, File last modified time.
After the XML file is created the application needs to display the entire folder hierarchy tree (by using the TreeView class).
Can anyone provide help and answer? Thanks!
Your question is - can u do my application for me - but anyway.
I will give you some hints to get started with your Project.
First of all - Check out
MVVM
here. This will help you - to handleWPF
.1. Pick the starting folder
Then you will need a
FolderPicker
to start your SearchU will need the
System.Windows.Forms
Assembly for this. (Project -> Add reference -> Assembly)2. folders and files
Then you want to itterate through all folders.
Check out
System.IO.Directory
here3. file information
Check out
System.IO.File
here - this will give you some file data and to get the file size check this outTry following code. Fully tested. Start with small Directory. Very large folders may take time. I updated code to speed up loading the treeview.