dbTalk Databases Forums  

Monitoring for files

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Monitoring for files in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Joe90
 
Posts: n/a

Default Monitoring for files - 05-02-2005 , 03:04 AM






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.

Reply With Quote
  #2  
Old   
Michael Cole
 
Posts: n/a

Default Re: Monitoring for files - 05-02-2005 , 04:04 AM






Joe90 wrote:
Quote:
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.

Quote:
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?cod...chedfolder.htm


--
Regards,

Michael Cole




Reply With Quote
  #3  
Old   
John Bell
 
Posts: n/a

Default Re: Monitoring for files - 05-02-2005 , 04:06 AM



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 (AT) cyberdine (DOT) net> wrote

Quote:
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.



Reply With Quote
  #4  
Old   
JRStern
 
Posts: n/a

Default Re: Monitoring for files - 05-04-2005 , 04:59 PM



On Mon, 02 May 2005 08:04:57 GMT, Joe90 <matrix (AT) cyberdine (DOT) net> wrote:
Quote:
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



Reply With Quote
  #5  
Old   
Darren Green
 
Posts: n/a

Default Re: Monitoring for files - 05-04-2005 , 05:06 PM



In message <OkC06XvTFHA.2996 (AT) TK2MSFTNGP15 (DOT) phx.gbl>, Michael Cole
<noone (AT) hansen (DOT) com> writes
Quote:
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?cod...chedfolder.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 cool for VB6.


--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.