StCroixSkipper,
Can I say a big thank you! It took a bit of work, but I came up with the following:
PInvokeWin32.cs - as described on Page 1 of this thread.
Log.cs - A quick Log class that writes out a message with the word INFO first. No biggy.
MFT.cs - I think you call yours EnumerateVolume.cs. Either, the vast majority is listed on page 1.
A couple of changes that I made:
Includes:
Declarations:
Then to call, I did the following:
Works a treat! Many thanks!
Gaz
Can I say a big thank you! It took a bit of work, but I came up with the following:
PInvokeWin32.cs - as described on Page 1 of this thread.
Log.cs - A quick Log class that writes out a message with the word INFO first. No biggy.
MFT.cs - I think you call yours EnumerateVolume.cs. Either, the vast majority is listed on page 1.
A couple of changes that I made:
Includes:
using System; |
using System.Collections; |
using System.Collections.Generic; |
using System.Text; |
using System.Runtime.InteropServices; |
using System.IO; |
using System.ComponentModel; |
Declarations:
private IntPtr _changeJournalRootHandle; |
private Dictionary<ulong, FileNameAndFrn> _directories = new Dictionary<ulong,FileNameAndFrn>(); |
private string _drive = ""; |
public string Drive |
{ |
get { return _drive; } |
set { _drive = value; } |
} |
Then to call, I did the following:
static void Main(string[] args) |
{ |
Dictionary<UInt64, FileNameAndFrn> result; |
MFT mft = new MFT(); |
mft.Drive = "D:"; |
mft.EnumerateVolume(out result, new string[] { ".png" }); |
foreach (KeyValuePair<UInt64, FileNameAndFrn> entry in result) |
{ |
FileNameAndFrn file = (FileNameAndFrn)entry.Value; |
Console.WriteLine(file.Name); |
} |
Console.WriteLine("DONE"); |
Console.ReadKey(); |
} |
Works a treat! Many thanks!
Gaz