T
thinktwice
i have a file called "IsPathRelative.bat".
it's usage like : IsPathRelative.bat yourpath, it'll set
IsPathRelative=True if the path i passed in is a relativepath(not very
accurate$B!$(Bbut works for me) else set IsPathRelative=False
i call this bath file in another batch file.
.... get path1, path2
call IsPathRelative.bat path1
if %IsPathRelative% =="True" dosomething
if %path2%=="" (
call IsPathRelative.bat path2
if %IsPathRelative% =="" do other ) <--------------------for example
if path2 is relative path, it should be True, but actually it is
False. i have traced into IsPathRelative batch file , everything's
fine . before it leaves IsPathRelative file scope, %IsPathRelative% is
still True. why this happens?
it's usage like : IsPathRelative.bat yourpath, it'll set
IsPathRelative=True if the path i passed in is a relativepath(not very
accurate$B!$(Bbut works for me) else set IsPathRelative=False
i call this bath file in another batch file.
.... get path1, path2
call IsPathRelative.bat path1
if %IsPathRelative% =="True" dosomething
if %path2%=="" (
call IsPathRelative.bat path2
if %IsPathRelative% =="" do other ) <--------------------for example
if path2 is relative path, it should be True, but actually it is
False. i have traced into IsPathRelative batch file , everything's
fine . before it leaves IsPathRelative file scope, %IsPathRelative% is
still True. why this happens?