Format output text

by Aug 8, 2012


i make a script to colect files and send the list to a mail

The issue is that the display at the PS is ok 

but the file i send isnt the same format columns dont are the same

I make an HTML file and i was surprised the new files i have recived at the report

tried auto autosize and even and hash table format but nothing.

1- how can i align each column?

2- what are teh ps fields i recieve when i make a html instead of a txt file?

the script

 $path = Read-Host "Enter path"


 $FILE= $path+".TXT"


 $r=Get-ChildItem  $pathU -recurse | Where-Object {$_.Length -gt 20000KB}


   $r |ft  -WRAP name,directory,extension ,LastAccessTime,length  |  out-file  $FILE