Skip to content

Instantly share code, notes, and snippets.

@Bananasft
Last active August 27, 2016 19:41
Show Gist options
  • Save Bananasft/fa3df4931823290631ccd8d76ef10b95 to your computer and use it in GitHub Desktop.
Save Bananasft/fa3df4931823290631ccd8d76ef10b95 to your computer and use it in GitHub Desktop.
$inPath = "C:\NMS\unpacked";
$outPath = "C:\NMS\unpacked_exml";
$mbinCompiler = "C:\NMS\tools\MBINCompiler.exe";
Get-ChildItem $inPath -Filter *.mbin -Recurse | % {
$outDir = $_.Directory.FullName.Replace($inPath, $outPath);
if(!(Test-Path $outDir))
{
New-Item $outDir -ItemType Directory | Out-Null
}
$mbinFile = "`"$($_.FullName)`" ";
$exmlFile = "`"$outDir\$($_.Name.Replace(".MBIN",".exml"))`"";
& $mbinCompiler $mbinFile $exmlFile
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment