Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

NTFS USN change journal in Perl

by mst3000 (Novice)
on May 12, 2012 at 19:40 UTC ( [id://970214]=perlquestion: print w/replies, xml ) Need Help??

mst3000 has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to expand my programming skills and see if I can get some code to interface with the Windows USN journal.

So, my question: are there any Perl modules in existence that deal with these or has anyone ever directly accessed these through Perl?

If not, is there any other way to execute some Perl code any/every time a file being written is closed under Windows?

Hopefully one of the more experienced monks can help me in my quest. Thanks for your time.

Replies are listed 'Best First'.
Re: NTFS USN change journal in Perl
by BrowserUk (Patriarch) on May 12, 2012 at 20:44 UTC
    see if I can get some code to interface with the Windows USN journal.

    By far the simplest way would be to use backticks or a piped open to grab the output from fsutil.exe:

    C:\test>fsutil usn ? ---- USN Commands Supported ---- createjournal Create a USN journal deletejournal Delete a USN journal enumdata Enumerate USN data queryjournal Query the USN data for a volume readdata Read the USN data for a file

    You might also take a look at Win32::ChangeNotify.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    The start of some sanity?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://970214]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-25 16:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found