< Back

Compare-DTWFilesIgnoringBOM

Sat Jan 18, 2020 9:31 pm

NAME Compare-DTWFilesIgnoringBOM



SYNOPSIS

Compares two files, ignoring BOMs, returning $true if same, $false otherwise





SYNTAX

Compare-DTWFilesIgnoringBOM [-Path1] <String> [-Path2] <String> [<CommonParameters>]





DESCRIPTION

Compares two files, ignoring BOMs, returning $true if same, $false otherwise.

Line ending differences (Windows-style vs. Unix-style) are ignored during compare.





PARAMETERS

-Path1 <String>

Path to first file



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Path2 <String>

Path to second file



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Compare-DTWFilesIgnoringBOM 'c:\\temp\\file1.ps1' 'c:\\temp\\file2.ps1'



$true # files have same contents in this case but one has a BOM and the other does not











RELATED LINKS