Below is the simple powershell script to find Files in a Folder having Carriage return
Get-ChildItem -Path ‘\\fileshare\folder’ | ForEach-Object {
$contents = [System.IO.File]::ReadAllText($_.FullName)
if ($contents -cmatch ‘\r\n’) {
$_.BaseName
}
}
Happy scripting.
Regards,
Chaitanya