Run batch files in Windows XP
benji at benjiyork.com
Mon Jul 25 23:03:33 CEST 2005
> Looks like I'm not getting my parameters to my batch file correctly.
> I'm using os.system like this:
> os.system('bootmanager.bat %s' %"BOOTMANAGER ALL")
> where 'BOOTMANAGER ALL' is what I type at the command prompt arguments.
> That must not be right?
The batch file will see two parameters (in %1 and %2) if that's not what
you want, put double quotes around the %s, like so:
os.system('bootmanager.bat "%s"' % "BOOTMANAGER ALL")
More information about the Python-list