Jump to content

FileSystemMonitor UDF

Recommended Posts

On 1/7/2019 at 4:37 PM, argumentum said:

Hi :)
What you are been asked is your code, as anyone can get the UDF.  So cough up your script.

Sorry, English isn't my native language, so I don't know what you mean with "So cough up your script".

When you read my posts starting from ...

...I am not sure how to get a running UDF file, because to downloadable UDF file is not running, as far as I can evaluate this. It seems to me, that the Windows 10 API has changed which must be adjusted within the UDF, which wasn't possible to me and which is the reason why I am started writing posts here --> To get informed if there is an updated and working UDF file or to get help with the adjusting of the UDF.

My problem is, that I don't have any experience with the DllStruct... calls / function of AutoIt, as i wrote in previous posts...

So, back to starting post of me:

         Is there a UDF version available which works on current windows 10 systems with current AutoIt version


Share this post

Link to post
Share on other sites

The attached zip file contains my current working copy...

On 1/18/2019 at 3:55 PM, argumentum said:

you could use _WinAPI_FindFirstChangeNotification.htm or something from the help file. In so far, nothing has been perfect in my experience.

...I will try to use/integrate this function, thank you very much for this hint, sounds like it could be an alternative to the UDF.



--- UPDATE ---


After some research and different tries, I found WinAPI_ReadDirectoryChanges(), but the usage resulted in an execution problem, which is explained in...

...and solved by...

At the moment, this nice RDC UDF solved my problems and usage of FileSystemMonitor UDF isn't necessary anymore.

Edited by Taneeda

Share this post

Link to post
Share on other sites

This is a very brilliant UDF. 👍

I am looking for an additional feature to monitor changes on a USB attached drive beginning in the root of that drive and monitoring all changes on the drive not "only" in a given folder. I have had a look into the UDF but have not found something that would help me in this matter.

Has someone of you maybe got an idea how to monitor the whole given drive for changes and also list this changes (filenames)?

Many thanks in advance,
best regards


Share this post

Link to post
Share on other sites


All I have ever managed to do with the $sShellMon_Path parameter for _FileSysMonSetup is to get the "Drive free space has changed|SHCNE_FREESPACE" message whenever a file is added/deleted anywhere on the drive - but never any details on the file itself or its location.

I suppose you could use _FileListToArrayRec each time to look for changes, but it is a bit long-winded. Sorry i cannot be any more help.


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:


ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area


Share this post

Link to post
Share on other sites
Posted (edited)

@TheDude69 You can use _WinAPI_ReadDirectoryChanges with a USB attached drive (juste tested and working fine).  Check help file for the example.  Do not forget to set $bSubtree to 1 if you want to check the whole drive.  Be aware that the example is used in a blocking mode.  You can modify it to work in asynchronous mode, check MSDN for more explanations. 

edit : I did not read the whole thread, I was just answering your question.  I see there is sort of a discussion around this API above.  Just want to let you know that you do not need to create process threadS to make it work.  It is well explained in MSDN.

Edited by Nine

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...