monitor folders for files added, removed, renamed in a thead

Hi all, I want to be able to do a system wide hook on all files and folders copied, renamed,  removed, created or deleted....
I need to do it in a thread and get the changes added to a listbox or something so I can do what I want with them with stopping it capturing the file/folder changes still.
I have tried a couple of components, but none of them seem to capture all the files.
For example, I copy a folder from one drive to another drive with loads of small files inside it, It seems to get a few of them, but looses all the rest.

Anyone want to post me some code up so I can get started on the program I want to do.


Who is Participating?
CodedKConnect With a Mentor Commented:
I think one of the best is this :
    * File type association has changes;
    * File attributes changes;
    * A non-folder item creation / deletion / rename;
    * A non-folder item deletion;
    * Drive insertion / removed;   <----
    * Drive insertion and the Shell should create a new window for the drive;   <----
    * Storage media has been inserted / removed;   <----
    * Folder Creation / Deletion / Renamed;
    * Folder Sharings / Unsharing;   <----
    * Network Disconnection;   <----
    * The contents of an existing folder changes;
    * An image in the system image list changes;   <----
    * An existing nonfolder item changes, but the item still exists and has not been renamed.    <----

Here you can find many components for this :
MerijnBSr. Software EngineerCommented:
you want this system wide?
satmanukAuthor Commented:
well across all the drives.
Or even be able to just monitor a load or folders at the same time.
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Hi satmanuk

You can try this component :

This is a Windows API based component for monitoring any changes in specified local or remote folder. Unlike other Directory Monitors, this one doesn't lose events, even remote.

Monitored Events:

    * File/Folder Creation, Modify, Change, Deletion, Rename.
    * Security changes.
    * A single notification for every event.
    * Subdirectory notification.
    * The event receives the Path + File Name affected and selected Action.
MerijnBSr. Software EngineerCommented:
did you to use something like this: ?
MerijnBSr. Software EngineerCommented:
both probably use FindFirstChangeNotification  internally, did you use something like that yourself already?
satmanukAuthor Commented:
i want to be able tomonitor multiple drives and folders, i would have to have a folder monitor creater for each drive or folder with most of the components i have seen so far.
I need to be able to select a load of drives or folder and monitor them all the time for changes and aditions.
I have looked a the dir mon component, but i found it dropped to many files in my few test with it.
i looked at ShellNotify and this seemed to do what i needed on a XP box, but onc i added a few folders to it to monitor, i found i missed files when i copied them from drive to drive

I wondered if it was because i was using Delphi 2007, but tried in in my old delphi 6 and get the same results..

satmanukAuthor Commented:
not to worry, i seem to have got the shellnotify to collect the data..... Delphi 6 worked.

Why C Satmanuk?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.