Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tracking changes made to a folder in Delphi

I need to writing a Delphi program which will monitor a folder for changes (add, update, rename and removal of files).

I have seen suggestions to use theTShellChangeNotifier. Is this the correct solution for this problem? How should I use it?

like image 973
Snackmoore Avatar asked Nov 17 '09 07:11

Snackmoore


2 Answers

This question might help. mghie's answer shows how to properly use ReadDirectoryChangesW.

like image 71
jpfollenius Avatar answered Nov 15 '22 20:11

jpfollenius


I think this article will help you: Monitoring System Shell Changes using Delphi

Basically it analyzes the TShellChangeNotifier, discards it and then goes for a TSHChangeNotify which is basically a wrapper for the SHChangeNotify windows api function.

like image 5
Jorge Córdoba Avatar answered Nov 15 '22 19:11

Jorge Córdoba