@echo off

rem This will create the drive, path and filename variable (e.g "C:\Program Files (x86)\Traverse\plugin\monitors\filecheck\isfile.py")
SET script=%~d0%~p0%~n0.ps1

rem Without the echo command below stdin seems to be held open causing powershell not to terminate
echo . | c:\windows\system32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy Unrestricted "& '%script%'" %* 2> c:\users\public\dump