can any one help me to solve my problem below. I need to watch the file created inside the folder "C:\Logs\CustomService\Testing". I am using the FileSystemWatcher to watch the files created inside it but how can i watch the folder Testing for the below cases
case1: only contain drive C:\ how can i watch file created inside testing folder ?
case2: only contain following folder C:\Logs how can i watch file created inside testing folder ?
case3: only contain following folder C:\Logs\CustomService, How can i watch file created inside testing folder ?
case4: contian full path C:\Logs\CustomService\Testing , in this case i can use FileSystemWatcher to watch file created inside testing folder
Thanks,
Directory.CreateDirectorybefore watching the folder. Watching every parent folder to check if the child folder exists looks to be more work than simply forcing the directory to exist.