(I guess I wasn't really giving the full story...)
Typically I use batch files...
ah, i had -p in my batch file
& while, in general, i hadn't paid attention to it,
when i did /look/, i took it to mean, Pause - rather then Path
so knowing that...
with -no-p added to my command line, i'm ... working as expected
(just noting, with some searches still need to quaduple the ^, so ^^^^. or quotes...)
(maybe i'll get around to parsing the command line & if <regex:>, automatically add -no-p)
ECHO's help
Code: Select all
:: SSSq - SSS.bat *with* QUOTES
echo %*
pause
@echo OFF
echo %*
echo "%*"
pause
SET XES=%*
ECHO XES: %XES%
SET XES="%*"
ECHO "XES:" %XES%
pause
echo Found (& NOTE THE -p !!!):
es.ex2 -instance 15 -name -highlight distinct: audio: -p %*
PAUSE
goto end:
Results (nothing):
Code: Select all
C:\out\red>sssq regex:"^thick as a brick"
C:\out\red>echo regex:"^thick as a brick"
regex:"^thick as a brick"
C:\out\red>pause
Press any key to continue . . .
regex:"^thick as a brick"
"regex:"thick as a brick""
Press any key to continue . . .
XES: regex:"^thick as a brick"
"XES:" "regex:"thick as a brick""
Press any key to continue . . .
Found:
Press any key to continue . . .
Results, with -no-p added in - expected:
Code: Select all
C:\out\red>sssq regex:"^thick as a brick" -no-p
C:\out\red>echo regex:"^thick as a brick" -no-p
regex:"^thick as a brick" -no-p
C:\out\red>pause
Press any key to continue . . .
regex:"^thick as a brick" -no-p
"regex:"thick as a brick" -no-p"
Press any key to continue . . .
XES: regex:"^thick as a brick" -no-p
"XES:" "regex:"thick as a brick" -no-p"
Press any key to continue . . .
Found:
Thick As A Brick - Track01 (320).mp3
Thick As A Brick (320).mp3
Press any key to continue . . .
NOTE: that for -no-p, from the command-line, to override the -p in the .bat file,
the -p in the .bat file must come BEFORE the %* (as arguments are generally
evaluated left to right)
search: go.bat regex:"^thick as a brick" -no-p
Code: Select all
es.ex2 -instance 15 -name -highlight distinct: audio: -p %* !I: !H: -no-result-error
search: go.bat regex:"^thick as a brick" -no-p
Code: Select all
es.ex2 -instance 15 -name -highlight distinct: audio: %* -p !I: !H: -no-result-error
If you didn't want to add -no-p to your command-line,
you can automate it, checking for regex:, & if found run an ES without the -p
Code: Select all
SET XES=%*
ECHO %XES% | grep -i "regex:"
@if %errorlevel% EQU 0 goto regexfound:
echo Found:
es.ex2 -instance 15 -name -highlight distinct: audio: -p %* !I: !H: -no-result-error
PAUSE
goto end:
:regexfound
ECHO regex: was found, skipping path
es.ex2 -instance 15 -name -highlight distinct: audio: %* !I: !H: -no-result-error
goto end:
(Now, if you don't use -p, I do, then it's immaterial

.)