Hey All

Probably really simple, but I’ve got this powershell code which suits my needs of listing all files \ folders and create & modified dates perfectly

Get-ChildItem -recurse | Select-Object -Property FullName, CreationTime, LastWriteTime > C:\Angelas_files.csv

BUT… the FullName output is restricted - how can I get PowersShell to show the full length file path??

Dave

3 Spice ups

Restricted how?

See if this makes any difference.

Get-ChildItem -recurse | Select-Object -Property FullName, CreationTime, LastWriteTime | Export-Csv C:\Angelas_files.csv -NoTypeInformation
1 Spice up

Im guessing your file paths are being truncated ? If so thats because the default output for PS is table.

Try this code :-

Get-ChildItem -recurse | Select-Object -Property Path, FullName, CreationTime, LastWriteTime | Out-Gridview

This will display all data in a powershell grid - it will confirm your file path’s/names are not being truncated in powershell, rather in the output option.

So to resolve this, you can use the following command :-

Get-ChildItem -recurse | Select-Object -Property Path, FullName, CreationTime, LastWriteTime | Export-CSV C:\Scripts\Output\angelas_files.csv

Ive added scripts\output to your file path, simply because I hate seeing 101 scripts and outputs in the C drive - keep them organised so you can refer to them easily in the future :slight_smile:

Quick thought - you do have permissions to view the files properties?

2 Spice ups

Thank you guys!!!

:slight_smile:

Just a note, if ya’ll post code, please use the ‘Insert Code’ button. Thanks!
codebutton.png

1 Spice up