The contents of %0 depend on how you invoke the batch file (partial name, full name, partial path, full path, etc.), and is identical in both TCC and CMD. What you see in the IDE is because the batch debugger starts the batch file with a full path + full name.