I have a work around!

I am taking advantage of the Windows build in programming
language from hell (batch):

....................................................
my $PathIAm = $?FILE;
( my $IAm = $PathIAm ) ~~ s| .* "/" ||;

my $FileName = "@*ARGS[0]";

my Str $CmdStr =
    Q[@echo off] ~ "\n" ~
    Q[C:\Windows\System32\fsutil.exe usn readdata ] ~
    Q["] ~ $FileName ~ Q["] ~ "\n";

spurt( $BatFile, $CmdStr );
say qqx { $BatFile };
....................................................



C:\NtUtil>raku k:\Windows\NtUtil\FileAttributes.pl6 "Test 1"

Major Version    : 0x3
Minor Version    : 0x0
FileRef#         : 0x00000000000000000058000000000340
Parent FileRef#  : 0x00000000000000000013000000000eb9
Usn              : 0x00000000711dab68
Time Stamp       : 0x0000000000000000 12:00:00 AM 1/1/1601
Reason           : 0x0
Source Info      : 0x0
Security Id      : 0x0
File Attributes  : 0x20
File Name Length : 0xc
File Name Offset : 0x4c
FileName         : test 1

Reply via email to