Forum > Windows
[Closed] Making a special file scanning application !
loaded:
Hi All,
I am thinking of doing a study that scans folders, archives the file names of the files in the folder and the textual expressions in the file (the files to be scanned contain binary data) in the database, and then access this data by querying.
I have too many nested folders. After scanning all these and completing the process;
Is there a method that will automatically notify you when one of the folders is changed or added?
Or do I have to scan all folders over and over again each time?
I would appreciate it if anyone with experience could share. Respects.
Fibonacci:
https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-readdirectorychangesw
If you will watch "C:\" (or other disk), you will get notified if any file/folder on this disk is modified/created/deleted or renamed.
cdbc:
Hi
Have a 'looksee' at this: https://github.com/Wosi/DirectoryWatcher
It's written in pascal... :D
Regards Benny
loaded:
Thank you very much to both of you, Fibonacci and cdbc, for your nice answers.
Brother cdbc, I tried the example you gave and it works fine.
The only problem is that the application must be running constantly to detect the folder change.
For now, what I have in mind is that the application should work whenever I want it, rather than having it open all the time.
If there is such a feature in folder attributes I'd like to know about it, otherwise I'll keep the above aside as a solution.
Fibonacci:
You could read the NTFS journal, but its much more difficult than just scan -> watch
https://stackoverflow.com/questions/46978678/walking-the-ntfs-change-journal-on-windows-10
Navigation
[0] Message Index
[#] Next page