Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
File Trigger Cannot Monitor Files in Subfolders
#2
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"     Help - how to add the trigger to the macro
Code:
Copy      Help
;\
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
,,
,,


Messages In This Thread
RE: File Trigger Cannot Monitor Files in Subfolders - by Gintaras - 06-07-2026, 06:48 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)