Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - Formating with Compare-Object

Reply
 
Old 10-24-2008   #1 (permalink)
Matt


 
 

Formating with Compare-Object

I am trying to compare two text files with directory listings in each. The
files compare just fine but I am getting a problem with the output from
Compare-Output.

The problem is that is truncates the line when it gets to around 56
characters, with a '...' on the end.

Does anyone know how to get it to show th complete line?

Thanks

Matt


My System SpecsSystem Spec
Old 10-24-2008   #2 (permalink)
RickB


 
 

Re: Formating with Compare-Object

On Oct 24, 7:56*am, "Matt" <matt...com> wrote:
Quote:

> I am trying to compare two text files with directory listings in each. *The
> files compare just fine but I am getting a problem with the output from
> Compare-Output.
>
> The problem is that is truncates the line when it gets to around 56
> characters, with a '...' on the end.
>
> Does anyone know how to get it to show th complete line?
>
> Thanks
>
> Matt
I'm guessing that you are talking about the default format to the
screen
Ending with Format-List should show you what you want.

<your commands>|fl
My System SpecsSystem Spec
Old 10-27-2008   #3 (permalink)
Matt


 
 

Re: Formating with Compare-Object

Ok, that helps. The line is longer, but the really long lines still get
truncated.

I am trying to Compare two text files with filenames and paths. Some of the
paths are very long, so the lines get truncated.

eg .
c:\this\is\a\very\long\path\to\a\file\somewhere\on\the\file\system\someplace\or\another\file.txt
gets truncated to
c:\this\is\a\very\long\path\to\a\file\somewhere\on\the\file\system\someplace\or\anot...
Without the Format-List it comes out as
c:\this\is\a\very\long\path\to\a\file\som...

So, I am trying to get it to include the whole line.

Any ideas?

Thanks

Matt




"RickB" <rbielaws@xxxxxx> wrote in message
news:e7d6be2a-c6e9-4f57-953f-f107a0c664af@xxxxxx
On Oct 24, 7:56 am, "Matt" <matt...com> wrote:
Quote:

> I am trying to compare two text files with directory listings in each. The
> files compare just fine but I am getting a problem with the output from
> Compare-Output.
>
> The problem is that is truncates the line when it gets to around 56
> characters, with a '...' on the end.
>
> Does anyone know how to get it to show th complete line?
>
> Thanks
>
> Matt
I'm guessing that you are talking about the default format to the
screen
Ending with Format-List should show you what you want.

<your commands>|fl

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
compare-object PowerShell
compare object PowerShell
Compare-Object and Get the name of object/File? PowerShell
Testing object arrays using Compare-Object and -contains PowerShell
Adding canonical aliases for Compare-Object, Measure-Object, New-Object PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46