?
Solved

Xcopy / Robocopy Question

Posted on 2016-09-29
7
Medium Priority
?
84 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 25

Accepted Solution

by:
NVIT earned 2000 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 25

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
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 
LVL 25

Assisted Solution

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

Expert Comment

by:Tarmo Kabonen
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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
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…
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
Suggested Courses

771 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