WatchDirectory Forum
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl
watchDirectory forums >> How to... >> Watch for a specific file
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl?num=1101757912

Message started by thuslin on Nov 29th, 2004 at 8:51pm

Title: Watch for a specific file
Post by thuslin on Nov 29th, 2004 at 8:51pm
Question:

If I can exclude files by name and extensions using wildcards, why can't I just specify a particular file I'm waiting for in a specific directory?  

I have a series of files that are always delivered to the same place and each file is named the same every day.  It would be very simple and direct to define a Watchdirectory job that looks in folder e:\daily for file accounts.txt.  

From what I see in the help, this is not possible without using scripting extensions.  

Thank you.

Title: Re: Watch for a specific file
Post by Gert on Nov 30th, 2004 at 4:19am
The current 3.2 version has some extra possibilities to ignore certain files (see http://www.watchdirectory.net/watchDir/help/ignore.html).
However, monitoring for just 1 file is not really possible using these .ignore files.

You should add this at the top of your .bat file to ignore all files except accounts.txt:
[code]
IF /i "%WD_FILE_N%" NEQ "accounts.txt" GOTO :EOF
[/code]
Hope that helps,
Gert

[edit]referenced the wrong web page[/edit]

WatchDirectory Forum » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2017. All Rights Reserved.