Skip to content

Instantly share code, notes, and snippets.

$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
}
@Bananasft
Bananasft / Find-FileByMbinType.ps1
Last active September 7, 2016 12:44
Searches for .mbin files inside a directory that match the given template type
function Get-MBinType
{
PARAM(
[Parameter(Position = 0, Mandatory = $true, ValueFromPipeline = $true)]
[System.IO.FileInfo]$File
)
PROCESS
{
$start = 0x18
$end = 0x58