Posts: 1,222
Threads: 282
Joined: Jul 2022
I need to monitor files inside a folder named
T on the desktop.
If I drag and drop a folder named
A (which contains a file named
A.txt) into the
T folder, the trigger does not work. Nothing is displayed in the Output panel, and neither the trigger type nor the file path is reported.
The following video demonstrates the issue.
Posts: 12,288
Threads: 144
Joined: Dec 2002
1. QM bug - somehow file triggers don't work when the filename length is < 3.
2. QM triggers use the logic of the used Windows API. When a folder added, we have a notification for that folder only, not for files in it. Workaround: Let the script trigger include all files and folders; then enumerate files.
Function
File_trigger_files_in_added_folder
Trigger
$f 0xC07 "C:\Test"
;\
function event $name [$newname]
;event: 1 added, 2 removed, 4 renamed, 8 modified
out F"{event} {name}"
if event=1 ;;added
,if FileExists(name 2)=2 ;;folder
,,Dir d
,,foreach(d F"{name}\*.txt" FE_Dir 4) ;;enum descendant txt files
,,,str path=d.FullPath
,,,out path
,,
,,
Posts: 1,222
Threads: 282
Joined: Jul 2022
06-07-2026, 09:36 AM
(This post was last modified: 06-07-2026, 09:37 AM by Davider.)
Thanks for your help.
I tested the trigger code above, but it still doesn't work.
Posts: 12,288
Threads: 144
Joined: Dec 2002
The trigger is changed too, not only code.