In writing a function to parse arbitrary paths, I'm encountering an error for paths with drives which are unavailable (such as a path on a disconnected network drive).
An example of the function is:
:FN
setlocal
set p=%~dp1
...
goto :EOF
All variations on "%~dp1" and trying to use an expression based on %@full[%1] cause errors:
TCC: (Sys) The system cannot find the drive specified.
"X:"
This looks like a parsing error as I can only suppress it using a command group (eg, enclosing parenthesis).
CMD.exe works correctly, without complaint, but I want the function to work with TCC as well.
Is this a bug? Any suggestions on a work-around to avoid the pre-parsing?
Thanks, in advance.
- Roy
An example of the function is:
:FN
setlocal
set p=%~dp1
...
goto :EOF
All variations on "%~dp1" and trying to use an expression based on %@full[%1] cause errors:
TCC: (Sys) The system cannot find the drive specified.
"X:"
This looks like a parsing error as I can only suppress it using a command group (eg, enclosing parenthesis).
CMD.exe works correctly, without complaint, but I want the function to work with TCC as well.
Is this a bug? Any suggestions on a work-around to avoid the pre-parsing?
Thanks, in advance.
- Roy