You may want to introduce MSMQ in the mix as the files can be picked up near
"Sachy" <anonymous@discussions.microsoft.com> wrote in message
news:00ec01c3ca5b$23abc440$a401280a@phx.gbl...
> Thanks Darren,
>
> I didnt know about this. I will try this one somewhere.
> But in the mean time here is an alternative option.
> Well I got something to work using VBscript WScript.sleep.
> This way I stay in my DTS ActiveXScript. Here is what I
> did. It is working but needs some more final touch up and
> testing.
>
> 1. A Job is schedule to kick-off DTS.
> 2. DTS package starts with checking Today's schedule from
> SQL Table. Reads all the respective directory path from
> the table.
> 3. Upon knowing all the directories, it checks 1 by 1 all
> of them for existence of all the files.
> 4. If all files not found in any of the directories,
> CALL WscShell.Run("Sleep.vbs", True)
> where Sleep.vbs has only one line, WScript.sleep 10000.
> 5. After 10 seconds, it loops through again.
> 6. Finds all the files for any one folder, continues with
> importing data.
> 7. Imports the data from folder which has all the files in
> it.
> 8. Marks the status and continue to work on remaining.
>
> Does this makes sense or you find any flaw in here.
> I didnt have much time to finish this but if i get
> opportunity, i will try your way.
>
> Thanks to both of you,
> Sachy
>
> >-----Original Message-----
> >In article <OjHghJeyDHA.2308@TK2MSFTNGP11.phx.gbl>, Allan
> Mitchell
> ><allan@no-spam.sqldts.com> writes
> ><snip>
> >>
> >>My VB example was before the days of .Net. In .Net i
> would use the
> >>FileSystemWatcher class to do the waiting and fire the
> events to call my
> >>package.
> >>
> >
> >Even before .net this was possible, using the
> >FindFirstChangeNotification and related API calls. Here
> is a VB
> >implementation sample-
> >
> >
http://www.mvps.org/vbnet/code/fileapi/watchedfolder.htm > >
> >
> >--
> >Darren Green (SQL Server MVP)
> >DTS -
http://www.sqldts.com > >
> >PASS - the definitive, global community for SQL Server
> professionals
> >
http://www.sqlpass.org > >
> >.
> >