MartinRouterKing Posted August 22, 2016 Posted August 22, 2016 Hi All, Is there any software out there or anyway of finding out dates in which things have been created or last used? What i am trying to do is we have a share that is over 1TB in size and there is no need for it to be this big. I am trying to find out a full report that will tell me how long things have been on there and when they were last used. We are going to say to staff anything over 5 years old is going to be deleted. I have seen some files in there from 2001!! Thanks
Steve21 Posted August 22, 2016 Posted August 22, 2016 What exactly do you want the software to do? Even explorer will show that if you turn on more columns etc Or do you want it to delete it all too etc? Steve
HPlum78 Posted August 22, 2016 Posted August 22, 2016 PowerShell - gci C:\localapp -File -Recurse | select name, *time - - - Updated - - - you can then where clause I suppose to narrow down your dates...
HPlum78 Posted August 22, 2016 Posted August 22, 2016 or indeed this may well help you https://blogs.technet.microsoft.com/heyscriptingguy/2014/02/07/use-powershell-to-find-files-that-have-not-been-accessed/ I would before killing files backup as you never know just what is lurking in those file stores! any data that may need to be archived for compliance would be a bad thing to just go and delete!
MartinRouterKing Posted August 22, 2016 Author Posted August 22, 2016 At the moment I just want a report in date order showing me what is there. As it's folders inside folders and so on. It's a total mess!
HPlum78 Posted August 23, 2016 Posted August 23, 2016 gci C:\localapp -File -Recurse | select name, *time | sort-object LastAccessTime or gci c:\localapp -File -Recurse | select name, *time | export-csv c:\PSout\filesys\lastaccesstime.csv will give you a .csv file that you can open in Excel (others are available!) you could also while you are at it learn some PowerShell and pull out the other useful stuff you may also require like Directory so the above would look like this gci C:\localapp -File -Recurse | select name, directory, *time to find out more about what gci can get you, you can do the following gci | gm or you can do this the hard way by doing gci c:\localapp -File -Recuse | select * (the filter * select * is not the way to do things mind if you want to see why just do get-adobject -filter * select * !) oh and I know that giving out the alias is frowned upon so GCI is Get-ChildItem and GM is Get-Member.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now