Best way identify old files from windows servers.
Posted by jbala28@reddit | sysadmin | View on Reddit | 18 comments
Hi Team,
Hope all is well. I have bunch of windows file servers with 300gb+ data.
Iām looking for ways or free programs that can help me identify older files that like say not been modified or read for last 5 years or 10 years and I need to be able move those files to an archives storage while maintaining folder structure in case someone ask us to restore something,
Iām sure I can try generating powershell script for this. Is this better way to look this task? Has anyone done something similar.
Regards
Commercial_Growth343@reddit
Treesize pro is a great tool for this. I am not sure if the free version will help you though. But if you have a lot of local storage, and maybe are looking at doing cleanups or a re-org then that tool can be quite helpful.
_l33ter_@reddit
you;ve right - that's a basic powershell-script
something like that
Mayki8513@reddit
$Path = "HOME\Documents"š¤_l33ter_@reddit
what you've trying to say?
Mayki8513@reddit
instead of typing out a fake path, you can type a legitimate one and it saves you time typing and OP time not having to edit it
_l33ter_@reddit
How do I know where OP is looking?
Mayki8513@reddit
OP should be reading it for sure, and regardless of what your username may or may not be, you can't assume it's OPs š
_l33ter_@reddit
you can't assume it's OPs --> lol, never said that I assumed OPs username xd
BlotchyBaboon@reddit
300GB? Bah, just move it all to the cloud as it is. Tell your users to clean up their old stuff and then don't worry about it when they ignore you.
sderby@reddit
turbokid@reddit
Sounds like the job took care of itself? Let the cloud retention policy prune it down.
jbala28@reddit (OP)
I have bunch of these servers. Cost would high to manage these
AMoreExcitingName@reddit
Modified in the last 5 years...
robocopy /r:1 /w:1 /ndl /copy:DAT /e /L /minage:1899 D:\files C:\temp > oldfiles.txt
this is from memory, but will copy all files which are a minimum of 1899 days old, about 5 1/3 years. oddly enough that's the limit of robocopy. the /L switch means list results only, don't actually copy any data.
It pipes the output to a text file you can examine.
jbala28@reddit (OP)
I will try this thanks
_l33ter_@reddit
good old robocopy !
ranhalt@reddit
You want to know if any files have been read without modification, so what kind of logging exists on the server?
cjchico@reddit
.LastAccessTimein PowerShellMayki8513@reddit
the file system already has more than enough info for this