Hi Guys,
I need a script that can gather folders/files information from large drives (600GB to 1TB). The info that I will need are:
- Full name/path of the file
- File Size
- Date Created
- Date Modified
- Date last accessed.
So far I have the code below:
dir 'e:\' -recurse |
select FullName,Length,CreationTime,LastWriteTime,LastAccessTime |
Export-CSV e:\test\testit.csv -notype
Would it be possible to get the script adapted so as it can search on ‘If modified date is equal to ‘xxx’ days or older, then output data to csv..
The xxx would be the figure – i.e 365 for 1 year or more old.. or xxx would be the figure – i.e 730 for 2 years or more old..
Also would it be possible to modify the headers for the columns that it outputs on CSV file? Thanks