In anyone can advise me of my mistake, I'd very much appreciate it! The little bit of code needed is shown below:
using
System;using
System.Collections.Generic;using
System.Text;using
System.IO;namespace
DataMover{
class Program{
static int Main(string[] args){
Console.WriteLine("DataMover 1.2 reporting for service."); FileSystemWatcher fsw = new FileSystemWatcher();fsw.Filter =
"*.bak";fsw.Path =
@"C:\temp";fsw.IncludeSubdirectories =
false;fsw.EnableRaisingEvents =
true;fsw.WaitForChanged(
WatcherChangeTypes.Created, 10000);fsw.Created+=
new FileSystemEventHandler(bak_Created); return 0;}
static void bak_Created(object sender, FileSystemEventArgs e){
Console.WriteLine("{0} at {1} created!", e.Name.ToString(), e.FullPath.ToString()); Console.ReadLine();}
}
}
Thanks!
AnttiPosted Jan 15, 2006, 3:14 PM