The quoting on this line in your .bat file isn't right:
powershell -Command "(gc "!MyFile!") -replace '\>HiLineAssets\\', '>' | Out-File -encoding ASCII "..\!MyFile!" "
Try replacing it with this:
powershell -Command "(gc '!MyFile!') -replace '\>HiLineAssets\\', '>' | Out-File -encoding ASCII '..\!MyFile!' "