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
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 handle WPF
.
1. Pick the starting folder
Then you will need a FolderPicker
to start your Search
public static string PickFolder()
{
var dialog = new System.Windows.Forms.FolderBrowserDialog();
System.Windows.Forms.DialogResult result = dialog.ShowDialog();
string folder = string.Empty;
switch (result)
{
case System.Windows.Forms.DialogResult.OK: return dialog.SelectedPath;
case System.Windows.Forms.DialogResult.Cancel: return string.Empty;
default: return string.Empty;
}
}
U 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
here
3. file information
Check out System.IO.File
here - this will give you some file data and to get the file size check this out