Sorry of the delayed responce. That threw no error, but when you add the repl it does. I've done some narrowing down to
repl "+" "\x29" x in type "Batch File.tmLanguage" | repl "___" "|" | repl "-" "\x28" x | repl "+" "\x29" x. I'm not sure why its doing it, but now it throws:
C:\cmdPlugins\repl.bat(282, 1) Microsoft JScript runtime error: Unexpected quant
ifier
C:\cmdPlugins\repl.bat(305, 37) (null): The pipe is being closed.
C:\cmdPlugins\repl.bat(305, 37) (null): The pipe is being closed.
The process tried to write to a nonexistent pipe.
Which I believe is due to the use of ), but I can't figure out how to get around it.
@echo off
setlocal EnableDelayedExpansion
echo %path% | repl ";" "\r\n" xi >path.txt
if exist external.txt del external.txt
for /f "delims=" %%A in (path.txt) do (
cd /d "%%A" 2>nul
for %%X in (exe) do (
dir /b *.%%X >>%~pd0\external.txt 2>nul
)
)
cd /d %~pd0
del path.txt
type beginTemplate.txt >"Batch File.tmLanguage"
for /f "delims=" %%A in (external.txt) do echo.___%%~nA-%%~xA+?>>"Batch File.tmLanguage"
type template.tmLanguage >>"Batch File.tmLanguage"
type "Batch File.tmLanguage" | repl "___" "|" | repl "-" "\x28" x | repl "+" "\x29" x