Koldov Posted July 11, 2019 Posted July 11, 2019 Managed to find the following script to give me a rough idea of what to archive over the summer 'holidays'.... Get-ChildItem -Path E:\Staff$ -Recurse | Select-Object FullName, LastWriteTime , LastAccessTime, Length | Export-Csv -Path C:\Reports\folderage.csv -Encoding ascii -NoTypeInformation Although it completes, it is giving me quite a few errors (some access denied which I will look into) but most complaining about long path names! Is there any 'SIMPLE' way around this (bearing in mind I cannot code)? It's not even giving me enough information to find out where these folders are....
Arthur Posted July 11, 2019 Posted July 11, 2019 Install NTFSSecurity PowerShell module. Install-Module -Name NTFSSecurity Then run... [color="#FF0000"]Get-ChildItem2[/color] -Path E:\Staff$ -Recurse | Select-Object FullName, LastWriteTime , LastAccessTime, Length | Export-Csv -Path C:\Reports\folderage.csv -Encoding ascii -NoTypeInformation Get-ChildItem2 can cope with long file paths. 1
HPlum78 Posted July 11, 2019 Posted July 11, 2019 (edited) From memory if you are using wps 5.1 or later do the following Set-ItemProperty 'HKLM:\System\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -value 1 That should fix the std cmdlet Edited July 11, 2019 by HPlum78 1
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