ICQBOY Posted January 11, 2011 Share Posted January 11, 2011 Wow that's a really great function!This function "ReadDirectoryChangeW" could be monitor CD/DVD files/folders change? Link to comment Share on other sites More sharing options...
Zinthose Posted March 29, 2011 Share Posted March 29, 2011 ...Excellent work Jackchen & All!Ran some tests and here are my observations...Minor...Renaming a monitored folder is not triggered as a change although the changes within the renamed folder are retained. IMO This is both a good and bad thing.If the folder NTFS permissions change in a way that prevent access to the folder after the monitor was started, the changes are triggered.If the folder NTFS permissions change in a way that prevent access to the folder before the monitor was started, the changes are not triggered.If the folder NTFS permissions change in a way that allow access to the folder after the monitor was started, the changes are not triggered.If a sub-folder is a NTFS Junction to another folder not within the sub structure of the monitored folder, the changes are not triggered.If a sub-folder is a NTFS source junction to a folder not within the sub structure of the monitored folder, the changes are triggered.Major...Removing of the folder causes the event trigger to enter an apparent infinite loop, repeating the last change.For my purposes, the minor issues are not going to be a problem. However, the folder deletion issue is an defiantly a problem. I'm going to dig into the code and see if I can resolve it myself but I'm also calling the crowd to take a look as well. --- TTFN Link to comment Share on other sites More sharing options...
Demetris Posted June 23, 2011 Share Posted June 23, 2011 (edited) Is it possible to have something that will show in real time all existing files and directories in some directory and hide any deleted files and directories? What I'm trying to do is to watch some directory and see only existing files and directories recursively in real time. I need the option: Created... I don't need the option: Modified... Instead of "Deleted..." option I need to remove the line "Created..." for the deleted file. I'll try to explain it from my view: Lets say I have directories "c:\test\1" "c:\test\2" and files "c:\test\1\A" "c:\test\1\B" "c:\test\2\A". When program starts I need to scan folder in real time for existing data and show them all. Then let's say I'll delete the "c:\test\1\A" I need the created line "Created... c:\test\1\A" from before to disappear. Thanks. Ps. I found: It seems that's doing my job. Edited July 14, 2011 by Demetris Link to comment Share on other sites More sharing options...
TS-Steff Posted October 17, 2022 Share Posted October 17, 2022 Hi there This is a awesome script. Thanks a lot. I'm currently on a project where we should monitor multiple folders for new PDF-Files. If there is a new file, run an ocr and save it to another location. As long as there is only one source it works great. Processing a PDF normally takes about 10 to 20 seconds. Even if we copy multiple PDF to the source, all the files are picked up and are processed by ProcessWaitClose() The problem starts if there are multiple folders monitored. If I for example copy 3 PDFs to C:\test01 the script starts to pick them up and processing them. During this i copy 3 other PDFs to C:\Test02. These are not picked up because the function _MonitorDirectory() returns "Modified" instead of "Created". Is this a known issue or do any one have a solution for this? Thanks a lot again for the script provided and for any ideas on how to fix my problem. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now