Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 WMI DataReader detect new files in folder

Author  Topic 

Mathias
Posting Yak Master

119 Posts

Posted - 2008-08-19 : 09:31:11
I have created a WMI datareader task with the following:

server name : \\localhost
namespace : \root\cimv2

use windows authentification : true
WQL : select * from __InstanceCreationEvent WITHIN 10 WHERE TargetInstance ISA "CIM_DirectoryContainsFile" and TargetInstance.GroupComponent="Win32_Directory.Name=\"C:\\\\temp\""

output : datatable

I'll get an error running it. The same query will detect a new file if it is setup in a "WMI Event Watcher Task". Why is it working with one type of task and not the other?

The goal of the automation when a new files is detected, if will send the file as attachement in an email.
   

- Advertisement -