|
Re: How do I get format-table to drop that omission points (...) and display my data yes but now the output is wrapped in the file:
ls C:\WINDOWS\system32\drivers\etc | ft
CreationTime,LastWriteTime,LastAccessTime,FullName -wrap -auto >a.txt
Have a look at:
ls C:\WINDOWS\system32\drivers\etc | select
CreationTime,LastWriteTime,LastAccessTime,FullName | out-file a.txt
now powershell should know, that I am writing to a file ...
or look at:
ls C:\WINDOWS\system32\drivers\etc | select
CreationTime,LastWriteTime,LastAccessTime,FullName | out-string > a.txt
I looks to me as if the whole formatting subsystem in powershell assumes a
CONSOLE as default and not a textstream.
Only something like
ls C:\WINDOWS\system32\drivers\etc | foreach{ "{0,70} {1}" -F
$_.LastAccessTime,$_.FullName}
gives you a reliable output
"Keith Hill [MVP]" <r_keith_hill@mailhot.moc.nospam> wrote in message
news:%23OzeACahGHA.1612@TK2MSFTNGP04.phx.gbl...
> "Harald Ums" <Harald_Ums@hotmail.com> wrote in message
> news:%23tDEIzZhGHA.4304@TK2MSFTNGP05.phx.gbl...
>>I am doing:
>> PS C:\> ls C:\WINDOWS\system32\drivers\etc | ft LastWriteTime,FullName
>>
>> LastWriteTime FullName
>> ------------- --------
>> 23.08.2001 14:00:00 C:\WINDOWS\system32\drivers\etc\hosts
>> 23.08.2001 14:00:00 C:\WINDOWS\system32\drivers\etc\lmho...
>> 23.08.2001 14:00:00 C:\WINDOWS\system32\drivers\etc\netw...
>> 23.08.2001 14:00:00 C:\WINDOWS\system32\drivers\etc\prot...
>> 23.08.2001 14:00:00 C:\WINDOWS\system32\drivers\etc\serv...
>
> Try:
>
> ls C:\WINDOWS\system32\drivers\etc | ft LastWriteTime,FullName -wrap -auto
>
> --
> Keith
> |