Move oldest files (by last opened date) keeping directory structure on windows 2003 Server.

Hi all, I have a server that is almost full & we have a ton of old unnecessary files. What I would like to do is choose a folder with all subfolders, & move everything older than 2 years (by last opened date) to a different server but it must keep the folder structure so we can still find things when necessary. The server with the files is a Windows 2003 Server, the destination server is a Windows 2008 Server. I'm willing to pay for a program if its relatively inexpensive.

Thanks.
Jon
LVL 3
Jon DeVitoCTO / CIOAsked:
Who is Participating?

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

x
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.

vmaganCommented:
If all you're trying to do is move files from one server to another you should be able to use robocopy. it copies all the folders, subfolders, and permissions. Worked for me 2months ago when i migrated 2 servers from 2003 to 2008. Download robocopy using the link below.

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en

0

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
MaximumIQCommented:
I wrote a program a while back that did just about what you're looking for except it deleted files older than x number of days. The program was pretty extensive so it would take way too long for me to modify it to what you need.

The thing I wanted to point out though is that there are many dates involved in the process. Given a folder structure as C:\Folder1\Folder2\Folder3\<Files> with the possibility of files also residing in C:\Folder1 or C:\Folder1\Folder2.

You need to know exactly which dates you want to target. is it the DateLastAccessed for Folder1, Folder2, Each file within the entire Folder1 structure, etc.

If you decide to go by DateLastAccessed for Folder1, that will give you the date you last went looking around inside that folder which might not be the most acurate date to use.

If you decide to go by the newest date found within the folder, then you might end up with a 10GB folder not getting moved because of one 10kb file that was opened within the 2 years..

So if you can define the exact criteria you need, without getting too complex, I can write you a simple vbscript to do it.
0
Jon DeVitoCTO / CIOAuthor Commented:
Thanks, let me explain it a little better.
I have a server path of D:\Shared\NY\*.* which includes all subfolders.
I want to move all files that have been opened in the last 2 years to \\NY-Archive\c$\Files.
I want to keep the folder structure on move so I can find the files later.
If the folder already exists I want it to keep whatever is in the folder & just add this new stuff.

I'm looking at the RoboCopy also, just a little nervous trying to figure out the syntax, if I screw it up I'll have stuff moving all over my network which will suck to clean up.

Thanks again.
Jon
0
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

vmaganCommented:
robocopy syntax would look something like this:

C:program files\windows resource kits\tools>robocopy [source] [destination] /mir /copyall /create
which creates place holders of the folders you are moving over then you run

C:program files\windows resource kits\tools>robocopy [source] [destination] /mir /copyall

same thing but with out the create option at the end. thats it nice and simple. if something is wrong with the syntax you wont even be able to proceed. as long as you know the source and destination you should be ok.
0
Jon DeVitoCTO / CIOAuthor Commented:
Thanks, I used:

Robocopy "D:\Shared Folders\Showroom\" "N:\Shared Folders\Showroom\" /S /MOV /MINAGE:730

I may wind up with some empty folders this way but it seems to work.

Thanks for pointing me to RoboCopy, I'll be using it for plenty of other stuff going forward!

Jon
0
Bill PrewCommented:
ROBOCOPY should be the way to go, since you want to move the files, and preserve folder structure.  You will want some other options to process subfolders, etc, but the critical one for the date last accessed check is:

/MINLAD:n :: MINimum Last Access Date - exclude files used since n.
             (If n < 1900 then n = n days, else n = YYYYMMDD date).


Hope this helps,
~bp
0
Bill PrewCommented:
Be aware of the difference between MINAGE and MINLAD, your original post mentioned last access date rather than last update date...

/MAXAGE:n :: MAXimum file AGE - exclude files older than n days/date.
/MINAGE:n :: MINimum file AGE - exclude files newer than n days/date.
/MAXLAD:n :: MAXimum Last Access Date - exclude files unused since n.
/MINLAD:n :: MINimum Last Access Date - exclude files used since n.
             (If n < 1900 then n = n days, else n = YYYYMMDD date).


~bp
0
Jon DeVitoCTO / CIOAuthor Commented:
Thanks BP, one minute too late for split points.
I had to change to MINAGE though, the backup changes the access stamp.

Thanks.
Jon
0
Bill PrewCommented:
No problem on points, just wanted to make sure you had as much info as possible.  Good luck.

~bp
0
Jon DeVitoCTO / CIOAuthor Commented:
Thanks again. Very much appreciated!

Jon
0
vmaganCommented:
good luck with the robocopy and if you need anything else dont hesitate to ask. This should work smoothly for you though.
0
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
Windows Server 2003

From novice to tech pro — start learning today.