Solved

Can you help me with a robocopy command?

Posted on 2014-10-27
12
138 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
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 capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.

777 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