Quote Originally Posted by cjard
I think i just worked it out...

$(TargetDir) ends with a trailing slash for ?convenience?

But this trailing slash seems to be escaping the next quote, meaning that ?DOS? is thinking the call to:

ListArgs.exe "C:\windows\"

is one argument of: c:\windows"


This is nearly the stupidest thing i've ever seen.. how to work around that?
That is correct, it is one of the most "unusual" situations, and causes lots of people to get confused. Howere it is much more common to use the path in conjunction with a file name. If the "\" was not there, then everyone else would have to add it.

The best solution, if you really want to pass the path (and are not using it to build a FILE specification, it to simply append a ".".

This is fairly self documenting as "I want the current directory pointed to by the Target Directory".

So
Code:
$(TargetDir).
$(TargetDir)..
$(TargetDir)NewFileName
$(TargetDir)($OtherParam)
....