 .SYNOPSIS
  Export to CSV or Import to DAT-Files. Compare 2 scenarios or Update an modified scenario with differences from 2 scenarios

  .DESCRIPTION
  Compares all WITP Files for a given scenario with files from another scenario and logs the difference into a logfile.
  Instead of comparing it can also updates scenarios file. For this it uses files from original scenario, the updated (patched) files for this original scenario
  and the files for scenarios the differences should by applied (Mod). If there are any conflicts it is written to a conflictfile.

  .PARAMETER Worktype
  Specifies "Export" to export a specific Scenario to CSV Files
  Specifies "Import" to import a specific Scenario to DAT Files
  Specifies "Compare" to compare 2 scenarios and get a csv file with differences
  Specifies "Update" to compare an Original and Patched Scenario and Updates an third Scenario (Mod) with the differences 
  
  .PARAMETER ScenBaseDir
  Specifies the path to scenario Files. It searches for scenarios in this folder and subfolders. If empty, it searches in the folder where this script is and if nothing found it searches in the WITPAE Installation directory.
  All the generated files are located in the script Directory except the DAT-Files that are generated with "Import" Parameter. These files are written to the WITPAE\Scen Directory (the Installation Directory of the WITPAE Game). 
  If you would like to change the Import Directory you can add the ScenBaseDir togehter with the Import Parameter
  
  .PARAMETER ScenNo
  Specifies the Scenario number as 3 numbers string format, e.g. 002 for Scenario Number 2. For Compare and Update it will autogenerate the CSV Files first before it compares/Updates the scenarios

  .INPUTS
  None. You cannot pipe objects to WITPAECompare.ps1

  .OUTPUTS
  Writes differences into a log, conflits into another log and creates optional updated scenario files

  .EXAMPLE
  PS> .\WITPAECompare.ps1 -worktype Export -ExportScenNo 002
  
  
  
 This Tool requires witploadAE.exe in Version 9.0. It search for this Tool in the script or WITPAE Installation Directory.
 Best to use a new Directory in the Tools Directory (e.g. "Compare Directory) and copy this PowershellScript inside.
 
 
 Cheers, 
 Andy Aka Morphin
 