Analyzing Old Files in File Server

Some organization will always have an issue on their file server, not being well maintained or too many old files scattered around the server. In this post today, I want to concentrate more on my method of scanning old files that I’ve used in my professional experience.


I have managed to get all the item/objects that was classified under the drive, so I thought I may need to refine this using a more specific requirement that I want, so I added some more parameters as below

Ok! so now I can see all the folders and files, those that are older than ‘1/1/2017’, but that’s not what I want, I want to be able to extract all the size and total files that were classified under that category. So I added another parameters as below

But somehow, measure-object -sum, did not give me any count on the total sum that I’m looking for, so…I do some investigation on this, and apparently, that’s because of the *string* in the first line that was produce by command select length. Simply by adding select -expandproperty length, it has given me what I want as below. As you can see on the top, total size of the files have appeared in bytes.

So now, I can use this numbers and present this to our management, for further discussion and clean up.


Leave a Reply

Your email address will not be published. Required fields are marked *