< Back

Compare-DTWFiles

Sat Jan 18, 2020 9:31 pm

NAME Compare-DTWFiles



SYNOPSIS

Compares two files, returns $true if same, $false otherwise





SYNTAX

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





DESCRIPTION

Compares two files, returns $true if same, $false otherwise. If both files have a

BOM, uses Compare-DTWFilesIncludingBOM. If one file has a BOM and the other does

not, uses: Compare-DTWFilesIgnoringBOM.

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-DTWFiles 'c:\\temp\\file1.ps1' 'c:\\temp\\file2.ps1'



$true # files have same contents in this case











RELATED LINKS