C# console app that checks if new folders exists
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/7593955/how-can-i-watch-a-file-system-directory-to-see-when-files-are-added-to-it">How can I watch a file system directory to see when files are added to it?</a>  </p>
</blockquote>



<p>I am creating a console app in c# which one of its functionality is to scan a fix folder path(example c:\FixedFolderA) say every minute and check if a new folders has been created(Example c:\FixedFolderA\NewFolderB). </p>

<p>So several folders will be created under c:\FixedFolderA. </p>

<p>The new folders will have no subdirectories, just files which I will copy to other locations.</p>

<p>I am not sure of the  most efficient design to do this and need your help.</p>

<p>I was thinking of this workflow:</p>

<ol>
<li>Scan c:\FixedFolderA at the start of the program.</li>
<li>Store all the sub directories in a list.</li>
<li>Create a worker process that scans c:\FixedFolderA and check to see if that sub-directory exists in the list. If the directory doesn't exist perform some action.</li>
</ol>

<p>My concern is that the umber of sub-directories in c:\FixedFolderA  will increase overtime and the program would be traversing all these directories every minute.</p>

<p>Should the routine to check every minute be done with a process?</p>

<p>Can someone please share your ideas with the best design to get me started ?</p>

<p>Thanks .</p>
