title: Command Line 3 days rolling backup using RoboCopy
body: <p>what I would like to accomplish is have a three day rolling backup of the Source Folder, which will be modified every day. I want anything removed longer than 3 Days as worst case I will have to revert to the most recent backup but having that 3 Days allows me to revert back to a previous changes if need being.</p>
  
  <p>What I have done in Command Line is as follows:</p>
  
  <pre><code>SET STAMP=%DATE:/=-% %TIME::=.%
  SET SOURCE="C:\Users\PersonA\Documents\Test\Source"
  SET DEST="C:\Users\PersonA\Documents\Test\Destination\%STAMP%"
  
  robocopy %SOURCE% %DEST% /e
  
  forfiles -p "C:\Users\PersonA\Documents\Test\Destination\" -s -m *.* -d -3 -c "cmd /c echo @file"
  </code></pre>
  
  <p>I have timestamped and concatenated the FolderName and Current Date and Time.</p>
  
  <p>However the bit I am struggling with his removing anything longer than 3 Days, currently the process is just copying, but what I need is a process to detect modified date or perhaps created date and remove directory anything greater than 3 days with the code I produced. The deleted command I have added above doesn't seem to do anything at all.</p>
  
  <p>If anyone can help I will be most grateful.</p>
  
  <p>Thank you in Advance </p>