Does anyone know of a method using File System Objects to
monitor for filenames that are date & time stamped.
The filename will always follow the form "BACS Day File [ddmmyyhhmm]"
There should only ever be ONE file present in the directory - however
because it is timestamped I am finding it difficult to
write a procedure that will monitor for it.
The various methods I have looked at don't seem to support the use
of wildcards.
Would be gratteful for any advice that is offered !!
Regards
Joe.Joe90 wrote:
> Hi,
> Does anyone know of a method using File System Objects to
> monitor for filenames that are date & time stamped.
No. However even if I did, I wouldn't use it. The FSO is an abomination.
> The filename will always follow the form "BACS Day File [ddmmyyhhmm]"
> There should only ever be ONE file present in the directory - however
> because it is timestamped I am finding it difficult to
> write a procedure that will monitor for it.
> The various methods I have looked at don't seem to support the use
> of wildcards.
Try http://vbnet.mvps.org/index.html?co...tchedfolder.htm
Regards,
Michael Cole|||Hi
Such as:
http://www.sqldts.com/default.aspx?246
Once processes archive the file, therefore any file in the input directory
can be loaded.
John
"Joe90" <matrix@.cyberdine.net> wrote in message
news:Jalde.14751$5A3.484@.newsfe4-win.ntli.net...
> Hi,
> Does anyone know of a method using File System Objects to
> monitor for filenames that are date & time stamped.
> The filename will always follow the form "BACS Day File [ddmmyyhhmm]"
> There should only ever be ONE file present in the directory - however
> because it is timestamped I am finding it difficult to
> write a procedure that will monitor for it.
> The various methods I have looked at don't seem to support the use
> of wildcards.
>
> Would be gratteful for any advice that is offered !!
> Regards
> Joe.|||On Mon, 02 May 2005 08:04:57 GMT, Joe90 <matrix@.cyberdine.net> wrote:
>Does anyone know of a method using File System Objects to
>monitor for filenames that are date & time stamped.
>The filename will always follow the form "BACS Day File [ddmmyyhhmm]"
>There should only ever be ONE file present in the directory - however
>because it is timestamped I am finding it difficult to
>write a procedure that will monitor for it.
>The various methods I have looked at don't seem to support the use
>of wildcards.
LISTING 1: Code to Capture a Command-Line Tool's Output
Set objShell = CreateObject("WScript.Shell")
Set objScriptExec = objShell.Exec("ipconfig /all")
strIpConfig = objScriptExec.StdOut.ReadAll
WScript.Echo strIpConfig
Try this with a dir and wildcard, I guess.
Good luck!
Josh|||In message <OkC06XvTFHA.2996@.TK2MSFTNGP15.phx.gbl>, Michael Cole
<noone@.hansen.com> writes
>Joe90 wrote:
>No. However even if I did, I wouldn't use it. The FSO is an abomination.
>
>Try http://vbnet.mvps.org/index.html?co...tchedfolder.htm
>
File Watcher component in .Net may work, easier to use than the API, if
using .Net of course, but the VBNet stuff is very
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com
PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org
No comments:
Post a Comment