It does look like something is wrong, but here, it's no better with v15.
Code:
v:\> type eff.btm
@echo off
ver
set re=(?i-)str
set filename="C:\filename.txt"
echo ffind /e"%re%" %filename%
v:\> eff.btm
TCC 15.01.58 Windows 7 [Version 6.1.7601]
ffind /e"(?i-)str" %filename%
I added a work-around to my script so now it works for me with the newer versions as well.
Previously I used:
Code:
....
ffind %ffindargs% /e"%re%" %filenames%
Where the "re" variable was constructed according to the passed parameters and often contained parenthesis. When this was the case the "filenames" variable was not expanded.
The new work-around code is simply:
Code:
....
set re="%re%"
ffind %ffindargs% /e%re% %filenames%
This way the "filenames" variable is properly expanded.
Still, would be interesting to know why the old way did not work. Seems correct to me, but I will not pretend to understand all the intricacies of TCC/CMD command line parsing. Quite a lot of edge-cases!
The problem is because the leading ( causes the parser to think it's processing a command group. The trailing double quotes don't match up so the parser assumes that everything following the first trailing double quote shouldn't be expanded.
I have a workaround for this syntax in the next build of v21 & beyond. I doubt it will be back-ported to prior versions like v20.
Thanks for the info, and no need for back-porting to v20. I will upgrade to v21 or newer at some point, and the current work-around is good enough for now.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.