windows bat file question
Peter Hansen
peter at engcorp.com
Thu Mar 3 18:31:12 EST 2005
Duncan Booth wrote:
> Peter Hansen wrote:
>>>This should make it work:
>>> python %0.bat %*
>>
>>Only, among other issues, if you type the full path to the
>>batch file, or if it's in the current directory. This
>>approach fails if you put the batch file in a directory
>>somewhere along your path.
>
>
> The simplest fix, assuming we aren't talking Win9x is probably:
>
> python "%~f0" %*
Wow. The myriad things that get slipped into these little
operating systems while you aren't looking. Windows XP's command
shell begins to border on being marginally acceptable for some
limited types of scripting.
Unfortunately, Google makes it hard to search for such things,
but after a while I was able to dig up this master reference:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/percent.mspx
Thanks, Duncan!
-Peter
More information about the Python-list
mailing list