Solved

Xcopy / Robocopy Question

Posted on 2016-09-29
7
70 Views
Last Modified: 2016-10-15
All,
I have a very large directory that I need to copy the contents of, but very simply, I need to copy the files that are BEFORE 12/31/14.  
Is there a way to do that using any of the popular methods, XCopy, Robocopy, etc.?
It would also be create if this utility DELETED the source files after the copy, but that's 100% necessary.

Hopefully that makes sense, thanks in advance!
0
Comment
Question by:zito2000
[X]
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
7 Comments
 
LVL 24

Accepted Solution

by:
NVIT earned 500 total points
ID: 41821988
To copy, including empty subfolders:
robocopy /maxage:20141231 /e /r:1 /w:1 "c:\source folder" "d:\target folder"

Open in new window


To copy, including empty subfolders, and delete source folder and files:
robocopy /move /maxage:20141231 /e /r:1 /w:1 "c:\source folder" "d:\target folder"

Open in new window

0
 

Author Comment

by:zito2000
ID: 41822086
NVIT, thank you so much for the reply.
I'm not doubting you at all, I just want to triple check....
Does the /maxage:20141231 specify "move only things that are December 31, 2014 and LATER"...?  So it would take the  December 31, 2014 to present?  
Just want to be sure.

Thanks again!
0
 
LVL 24

Expert Comment

by:NVIT
ID: 41822158
Your original question says
...copy the files that are BEFORE 12/31/14.  

MAXAGE:n : MAXimum file AGE - exclude files older than n days/date.

MINAGE:n : MINimum file AGE - exclude files newer than n days/date.

To instill confidence, do on a test folder first. Especially since you're using the MOVE switch.

As an aside... Do you need other Security data, besides the default ?

http://ss64.com/nt/robocopy.html
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
LVL 24

Assisted Solution

by:NVIT
NVIT earned 500 total points
ID: 41822188
Apologies. Should use MINAGE
0
 
LVL 2

Expert Comment

by:kapsionu
ID: 41822542
I suggest to use also /MT as multi-threaded copy option (the value is 8 by default) - helps a lot in time, if there are an army of small files involved :).
0
 

Assisted Solution

by:zito2000
zito2000 earned 0 total points
ID: 41842033
The final script I ended up using was:
robocopy /move /minage:20101231 /e /r:1 /w:1 "c:\source folder" "d:\target folder"
0
 

Expert Comment

by:Dhanraj Pratap
ID: 41844745
You could explore ForFiles
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
A safe way to clean winsxs folder from your windows server 2008 R2 editions
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

733 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