04-03-2013, 03:44 PM
Hi Gintaras, hi all,
revive the thread cos I could use it in different way, but I need to tweak it.
Function ReparseTest
Trigger $f 0xBFF "T:\WatchedFolder"
This code works flawlessly for months now, is used to mount USB disk to junction, and i'd like to extend it that way:
When a junction is created, a new *dynamic* file/folder trigger function is launched to monitor the newly created junction for monitoring file/folder changes
on the USB disk, and when junction is no more used (ie USB disk is disconnected), the new trigger function stops.
Possible?
Thanks.
revive the thread cos I could use it in different way, but I need to tweak it.
Function ReparseTest
Trigger $f 0xBFF "T:\WatchedFolder"

function event $name [$newname]
;event: 1 added, 2 removed, 4 renamed, 8 modified
_s=name
sel event
,case [8]:
,int attr=GetFileAttributesW(@F"{name}"); if(attr=-1) end "failed, %s" 0 _s.dllerror
,if(attr&FILE_ATTRIBUTE_REPARSE_POINT) UseUSBDisk(_s)
,;else out F"{name} directory"This code works flawlessly for months now, is used to mount USB disk to junction, and i'd like to extend it that way:
When a junction is created, a new *dynamic* file/folder trigger function is launched to monitor the newly created junction for monitoring file/folder changes
on the USB disk, and when junction is no more used (ie USB disk is disconnected), the new trigger function stops.
Possible?
Thanks.
