?
Solved

Can you help me with a robocopy command?

Posted on 2014-10-27
12
Medium Priority
?
143 Views
Last Modified: 2014-11-06
A client has a mix of documents that were last modified before 2013 and after 2013.  We'd like to archive all documents before 2013, but don't want to lose our directory structure.  Would you help write a robocopy for this?


Thanks!
0
Comment
Question by:epichero22
[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
  • 5
  • 5
12 Comments
 
LVL 29

Expert Comment

by:becraig
ID: 40406883
You need to look at using maxage / minage

robocopy source destination /MIR /minage 1/1/2013 

Open in new window


/minage:<N>
      

Specifies the minimum file age (exclude files newer than N days or date).

More info:
http://technet.microsoft.com/en-us/library/cc733145.aspx
0
 
LVL 11

Author Comment

by:epichero22
ID: 40406930
Will this move older files or simply copy them?
0
 
LVL 29

Expert Comment

by:becraig
ID: 40406958
In order to move we would have to add the /mov flag
/mov  Moves files, and deletes them from the source after they are copied.

That would delete the source once the copy is complete.

robocopy source destination /MIR /mov /minage 1/1/2013 

Open in new window

0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 11

Author Comment

by:epichero22
ID: 40407632
Here's what I used:

robocopy "source" "Destination" /MIR /move /minage:20131201

Slightly different from what you mentioned, namely the "move" vs. "mov".  Any concerns with that?
0
 
LVL 29

Accepted Solution

by:
becraig earned 2000 total points
ID: 40407648
/move would also move folders, so if you have folders in the structure you want to move then that is appropriate.

One does files the other does files and folders.
0
 
LVL 11

Author Comment

by:epichero22
ID: 40411411
I've requested that this question be closed as follows:

Accepted answer: 0 points for epichero22's comment #a40407632
Assisted answer: 500 points for becraig's comment #a40406958

for the following reason:

The command provided wasn't exactly the correct.
0
 
LVL 29

Expert Comment

by:becraig
ID: 40411412
The question indicated files and not folders:
We'd like to archive all documents before 2013

Had the OP indicated folder moves, then the correct flag of /move would have been provided.

The key question:
A client has a mix of documents that were last modified before 2013 and after 2013.  We'd like to archive all documents before 2013, but don't want to lose our directory structure.  Would you help write a robocopy for this?

The answer for the question posed was the /minage flag
0
 
LVL 11

Author Comment

by:epichero22
ID: 40411424
Well, the minage parameter was also incorrect.  But I'm still awarding points.
0
 
LVL 29

Expert Comment

by:becraig
ID: 40411439
Can you tell me what was the problem with the minage parameter ?
Does it not work as described in the link provided ?

Did it not exclude files after the date specified in the command ?
If so please indicate, the value here is in ensuring the information given is correct or at least if it is not we move towards identifying the correct solutions.

Since you did not end up using the minage flag, can you identify what flag you did use this will help future users.
0
 
LVL 11

Author Closing Comment

by:epichero22
ID: 40425788
This was the command that we used and proved successful.
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

This article summaries thoughts and ideas from two years of sustained use. It provides good reasoning to make the jump to Windows 10.
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 …
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
Suggested Courses

800 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