How to read all NTFS files with PowerShell?

  Kiến thức lập trình

AFAIK , NTFSDirect allows us to access the MFT directly to obtain information about the files and directories on an NTFS volume. https://github.com/luisllamasbinaburo/NTFSDirect

c# Code :

string vol = "c:";

var fileList = new NTFSDirect.Enumerator(vol, new [] {".txt", ".md"});

foreach(string file in fileList) 
{
    FileInfo f = new FileInfo(file);
    if (!f.Exists) { continue; } //every file is enumerated even ones we don't have access to.

are C# code which can do it. But I’ve not seen it wrapped in powershell.

My question is : How can I do this via PowerShell script ?

Thanks,

LEAVE A COMMENT