Spaces are significant in SET
statements. In line 3, you are setting a variable "output "
not "output"
Remove the spaces around the =
in line 3 and after the %%a
in line 4 (but cosmetic only here.)
Also - not clear whether ...
is (omitted) or (parent-of-parent). If absolute filename contains spaces, "quote it"
Could also be that your starting directory is different for each invocation. The cd
on line 2 changes the current directory on the D:
drive, but does not affect the default drive. You'd need to execute D:
to switch the default to drive D:
. revision.bat
on line 4 is relative to the default.