R.Wieser
2022-11-20 11:48:12 UTC
Hello all,
I've written a test batch showing a directory tree. In it I noticed that
echo-ing an argument containing a pathname containing an "&" causes a
problem when done directly :
echo %~xn1
but doesn't when done indirectly :
for %%a in (%1) do echo %%~xna
Does anyone have an explanation for it ?
And a question : How do I tell the batchfile parser *not* to parse the %~xn1
results but instead just display it as-is ?
I know that I can wrap it in doublequotes :
echo "%~xn1"
but those doublequotes get displayed too. :-(
Regards,
Rudy Wieser
I've written a test batch showing a directory tree. In it I noticed that
echo-ing an argument containing a pathname containing an "&" causes a
problem when done directly :
echo %~xn1
but doesn't when done indirectly :
for %%a in (%1) do echo %%~xna
Does anyone have an explanation for it ?
And a question : How do I tell the batchfile parser *not* to parse the %~xn1
results but instead just display it as-is ?
I know that I can wrap it in doublequotes :
echo "%~xn1"
but those doublequotes get displayed too. :-(
Regards,
Rudy Wieser