use Win32::AdvNotify; my $obj = new Win32::AdvNotify || die "$!\n"; my $thread1 = $obj->StartThread( Directory => "C:/spot/run", Filter => LAST_WRITE, WatchSubtree => Yes ) || die "$!\n"; $thread1->EnableWatch() || die "$!\n"; while($obj->Wait(INFINITE)){ while($obj->Read(\@data)){ for($i=0;$i<=$#data;$i++){ print "$data[$i]->{FileName}\n"; } } } $thread1->Terminate(); $obj->Free;