Using robocopy or other Script to archive unused files

Hello, Experts!

I am interested in creating a Robocopy, VB, or other script that can be used to move files that have not changed in 3 years to a separate share with file structure intact. The end goal is to setup a Scheduled Task that will automatically archive files that have not been used within our environment for an extended period of time.

I am certain I am not taking all aspects of such a process into account, so feel free to include suggestions. In the end, I just know that there are files that are just sitting idle, taking up space, that could be moved to cheaper disks.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NVITEnd-user supportCommented:
For your case, you'd use the  /MINAGE:n and /MOVE switches.

Here's an example that copies 3 yr old (365 x 3) files from c:\data to e:\archive\data, including subfolders. All files are logged. If you don't want that, add the /nfl switch:
robocopy /minage:1095 /move /e /ndl /r:2 /w:3 /dcopy:t /log+:c:\logfile.txt "c:\data" "e:\archive\data"

Open in new window

Be sure to test on a small sample first.

Possible issue/consideration: Will moving the files affect other files dependent on them?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
WoodraxAuthor Commented:
Proposed solution fits our needs.
NVITEnd-user supportCommented:
Thanks. I'm glad it works for you.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.