I have a script that does DirExist("%destdir%") where the destdir ihas blanks in the name . It always fails on this line. How can I get it return a true value?
The DirExist function does not care where or not the input path contains blank characters. Why are you using substitution and what do you mean by 'fail'?
I would imagine that if the "destdir" variable contains newlines (I.e., CRLF) in it, the above statement would "fail" big time.
If by "fail big time" you mean the function returns zero, that is correct.