Guest User

Untitled

a guest
May 30th, 2014
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. clear
  2. Function Get-FileName($initialDirectory)
  3. {
  4.     [System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") | Out-Null
  5.  
  6.     $OpenFileDialog = New-Object System.Windows.Forms.OpenFileDialog
  7.     $OpenFileDialog.initialDirectory = $initialDirectory
  8.     $OpenFileDialog.filter = "All files (*.*)| *.*"
  9.     $OpenFileDialog.ShowDialog() | Out-Null
  10.     $OpenFileDialog.filename
  11. } #end function Get-FileName
  12.  
  13. # *** Entry Point to Script ***
  14. $Location = Convert-Path (Get-Location)
  15. $a = Get-Content(Get-FileName -initialDirectory $Location)
  16. $b = Get-Content(Get-FileName -initialDirectory $Location)
  17. Compare-Object -referenceObject $a -differenceObject $b | Format-Table | Out-File ($Location + "\Compared.txt")
Advertisement
Add Comment
Please, Sign In to add comment