Re: 'rar' is not recognized as an internal or external commandŁżŁżŁżŁż

Dejan Rodiger dejan.wirusrodiger at ck.t-com.hr
Thu Feb 23 05:53:56 EST 2006


Ę÷ÉϲäťŇ said the following on 23.02.2006 10:03:
> rar_cmd = r'"D:\Program Files\WinRAR\rar.exe" a -idcdp %s %s' % (target,' '.join(source))

You can't cd to d:\Program Files\WinRAR and then call rar

You have to call rar with full path.

from subprocess import *
retcode = call([r'"D:\Program Files\WinRAR\rar.exe"', 'a', '-idcdp', target,
' '.join(source)])
if retcode == 0:
	print "everything OK"
-- 
Dejan Rodiger - PGP ID 0xAC8722DC
Delete wirus from e-mail address



More information about the Python-list mailing list