Solved

ROBOCOPY files older than 30 days exclude folders

Posted on 2014-04-16
3
8,085 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 8

Accepted Solution

by:
Lee Ingalls earned 500 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

828 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