WatchDir -- can it watch for only Newly Created files?

nnCron and nnCron LITE discussion

WatchDir -- can it watch for only Newly Created files?

Postby LuckMan212 » Wed, 05 Jul 2006, 00:49

Hello,
I have a task which monitors incoming fax folder, and does some things when new fax arrives. However, this task also triggers when fax is deleted, which is not desirable.

here is my code:
Code: Select all
#( incoming_fax_monitor
AsLoggedUser
LoadProfile
VARIABLE flagExit2
WatchDir: "%ALLUSERSPROFILE%\Application Data\Microsoft\Windows NT\MSFax\Inbox"
: user_click3
   0 S" FxsClnt.exe /new" GUIStartApp
   flagExit2 ON
;
Action:
   flagExit2 OFF
   1 BalloonIcon !
   ['] user_click3 OnBalloonClick !
   BALLOON: "Fax Service" "A new fax has been received.  Click here to open the fax console."
   PAUSE: 5000
   BALLOON: "" ""
   flagExit2 @ 0=
   IF
      HINT-OFF
      S" Tahoma" 13 HINT-FONT
      0x222222 0xFFFFFF HINT-COLOR
      HINT-POS: 1080 960 HINT-SIZE: 190 25
      HINT: "You have received a new fax."
   THEN
)#

is there any way to add modifier so WatchDir only triggers when new files are ADDED, and ignores modification dates and deletions? or is there any other way to accomplish this?
thank you very much! :wink:
LuckMan212
 
Posts: 133
Joined: Mon, 04 Jul 2005, 11:19

Return to nnCron forum (English)

Who is online

Users browsing this forum: Bing [Bot] and 3 guests

cron