title: Folder Monitoring with Batch File
body: <p>I want to monitor my folder if new file added or not. Then If added I would like to execute some files. But I don't want to use third party app.</p>
  
  <p>I have some ideas but I don't know how to do that. </p>
  
  <p>This is my folder; D:\MonitoringFolder</p>
  
  <p>So every hour batch file will check the files inside of it and writes them into a txt.</p>
  
  <pre><code>dir /b "D:\MonitoringFolder" &gt; old.txt
  </code></pre>
  
  <p>Old.txt is --> string 1 , string 2, string 3</p>
  
  <p>After one hour, batch file will check it later and writes again into another txt.</p>
  
  <pre><code>dir /b "D:\MonitoringFolder" &gt; new.txt
  </code></pre>
  
  <p>New.txt is --> string 1, string 2, string 3, string 5</p>
  
  <p>Then it will compare new.txt and old.txt. So string 5 added recently. It will prompt a window and says "String 5" added!. Or new file added (removed).</p>
  
  <p>I want to do that If someone could show me a way to do this I would appreciate that.</p>