title: How to get Folder age (The Number of Days from creation or modification date)
body: <p>Under a spesific path need to find all folders that have the name "MyData". Inside every "Mydata" need to get the age of every folder (days).
  Then I will perform a set of commands if the age is greater than N days.
  Till now I already found all the folders "MyData" and their last modification date, the script is:</p>
  
  <pre><code>for /f "delims=" %%a in ('dir /b /s /a:d "C:\Mypath\" ^|findstr /e /i "\Mydata"') do (
      for /f "delims=" %%k in ('dir /b /s /a:d "%%~a\"') do (
              echo %%k
      for /d %%a in ("%%k") do echo Modified date: %%~ta
      ) 
  )
  </code></pre>
  
  <p>from here need to compare the modified date with the current date to get the age in days. Please your help thanks!
  <strong>Comment: Please avoid using <code>forfiles</code> My machine has WIN-XP and <code>forfiles</code> doesn't exist and didn't work even after dowloading it to C:\windows\system32. Thanks!</strong></p>