Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I'm building a windows form application (in C# 4.0) which starts an external program (via process.start etc.) Is there a way to detect whether this external program creates any files/folder, and if so where? I've looked into process.StandardOutput, but this doesn't seem to be it (unless ofcourse I'm doing it wrong...)

Any help would be appreciated
Posted

1 solution

The FileSystemWatcher class[^] is perhaps what you are looking for.
Here[^] is a good article to help you get started.
 
Share this answer
 
Comments
pWouter 2-Nov-12 10:17am    
Thanks Abhinav S, thats quite a nice article. However, I can't know beforehand if the external program will produce files/folders, nor where it will create those. I don't really fancy watching my entire filesystem, also because I (or the user) then can't really work when it's running.
Ideally I'd have something that could watch the process to see if files of folders are created by that process.
Wouter
Akinmade Bond 3-Nov-12 13:15pm    
Nope, If the 'external' program uses a dialog, the user can create a file/folders anywhere.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900