Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ROBOCOPY files older than 30 days exclude folders

Posted on 2014-04-16
3
Medium Priority
?
9,406 Views
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.

Thanks
0
Comment
Question by:hgj1357
  • 2
3 Comments
 
LVL 2

Author Comment

by:hgj1357
ID: 40004563
..Also, overwrite duplicate files and recreate file structure in destination.
0
 
LVL 9

Accepted Solution

by:
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...
http://compdocs.blogspot.com/2007/01/robocopy-switches.html
0
 
LVL 2

Author Closing Comment

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

Thanks
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
This Micro Tutorial will teach you how to reformat your flash drive. Sometimes your flash drive may have issues carrying files so this will completely restore it to manufacturing settings. Make sure to backup all files before reformatting. This w…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

916 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