title: How to use "find" command to get files created yesterday?
body: <p>I m running a batch file that gets a list of all files and subfolders under a directory. then I will filter out some specific files created today and yesterday from that list. I have some difficulty of finding file created yesterday, I thought maybe <code>%date% - 1</code> may work but it doesn't. Can anyone help me on this ? Thanks</p>
  
  <pre><code>REM SETUP CREATE TIME
  for /F "usebackq tokens=1,2 delims==" %%i in (`wmic os get LocalDateTime /VALUE 2^&gt;NUL`) do if '.%%i.'=='.LocalDateTime.' set ldt=%%j
  set ldt=%ldt:~0,4%-%ldt:~4,2%-%ldt:~6,2% %ldt:~8,2%:%ldt:~10,2%:%ldt:~12,6%
  
  
  REM LIST OF FILES AND FOLDERS
  
  dir /s "K:\AppData\Released_To_Production" &gt; "C:\K_RLTP_FILES.txt"
  dir /a:d /t:w /s "K:\AppData\Released_To_Production" &gt; "C:\K_RLTP_Folders.txt"
  
  REM TODAY'S CATIA FILES
  
  echo List is Created @  [%ldt%] &gt; "C:\catia_result.txt"
  echo -------------------------------------------- &gt;&gt; "C:\catia_result.txt"
  echo -------------------------------------------- &gt;&gt; "C:\catia_result.txt"
  find ".model" "C:\K_RLTP_FILES.txt" | find "%date%" &gt;&gt; "C:\catia_result.txt"
  find ".CATPart" "C:\K_RLTP_FILES.txt" | find "%date%" &gt;&gt; "C:\catia_result.txt"
  </code></pre>