Solved

Can you help me with a robocopy command?

Posted on 2014-10-27
12
140 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
  • 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
Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

 
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 500 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

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Selecting Right Partition 6 69
Fatal Error 11 40
How do I get my Password GPO settings to work on my Network? 32 54
Hyper-V-server 2016 13 78
When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
While working, an annoying popup showing below will come and we cannot cancel or close it form the screen. The error message will come again and again.
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.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

839 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