Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <#
  2.     In case you have problems with svn commit failing
  3.     with error about non-LF characters in properties,
  4.     you can run this script to easily find those files
  5. #>
  6.  
  7.  
  8.  
  9. function Check-0x0d($file)
  10. {
  11.     $c = Get-Content $file.fullname -Encoding Byte
  12.     for ($i=0; $i -lt $c.length; $i++)
  13.     {
  14.         if ($c[$i] -eq 0x0d)
  15.         {
  16.             return $true
  17.         }
  18.     }
  19.     return $false
  20. }
  21.  
  22. ls -Path .\ -Include dir-props -Force -Recurse | where {Check-0x0d $_} | %{$_.fullname}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement