Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


ROBOCOPY files older than 30 days exclude folders

Posted on 2014-04-16
Medium Priority
Last Modified: 2014-04-16
I am using robocopy to move files not accessed in 30 days:

ROBOCOPY "C:\_Test1" "C:\_TEST2" /move /minlad:0 /s

However, it is not quite doing what I need.  I want it to move files but leave all folders intact.

Question by:hgj1357
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Author Comment

ID: 40004563
..Also, overwrite duplicate files and recreate file structure in destination.

Accepted Solution

Lee Ingalls earned 1500 total points
ID: 40004612
Have you tried ROBOCOPY "C:\_Test1" "C:\_TEST2" /move /minage:30 /s

/MINAGE:n Excludes files with a Last Modified Date newer than n days or specified date. If n is less than 1900, then n is expressed in days. Otherwise, n is a date expressed as YYYYMMDD.

/MOV Moves files (that is, deletes source files after copying).
/MOVE Moves files and directories (that is, deletes source files and directories after copying).

Reference the following link for complete Robocopy switches and usage...

Author Closing Comment

ID: 40004734
So the key here is using /MOV and not /MOVE


Featured Post

The Ideal Solution for Multi-Display Applications

Check out ATEN’s VS1912 12-Port DP Video Wall Media Player at InfoComm 2017. Kerri describes how easy it is to design creative video walls in asymmetric layouts and schedule detailed playlists ahead of time with its advanced scheduling feature.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
Know the reasons and solutions to move/import EDB to New Exchange Server. Also, find out how to recover an Exchange .edb file and to restore the file back.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question