SnakE - 2011-04-05

2825083

This solution doesn't work if there are command line parameters. The shift in the loop changes the %0 so that it is incorrect at the point Perl is started.

There can be spaces in the %~dp0 while the ~ operator strips any quotes that %0 might have had. Quotes are required to make it work for paths with spaces.

The %~dp0 always ends with a backslash. There is no need in repeating it.

Actually this whole bat file can be replaced with one line:

@perl "%~dp0NaturalDocs" %*

Tested in Windows 7, should work fine in others starting from Win2000. I'm not sure if Win98 has got the %* or %~... operators.