1

Hi how i can add the double quotes to a folder ? with a initial " and a final " ? in a python file without receiving errors ?

this is the bat file with quotes

rar.exe x -o+ -p12345pass temp.rar "%Localappdata%\Temp\"

and this is the python file without quotes

win32api.WinExec("cmd.exe /c rar.exe x -o+ -p12345pass temp.rar %Localappdata%\\Temp\\",0)

2 Answers 2

1

Using single quotes can help you too:

win32api.WinExec('cmd.exe /c rar.exe x -o+ -p12345pass temp.rar \"%Localappdata%\\Temp\\\"',0)
Sign up to request clarification or add additional context in comments.

1 Comment

And probably you don't even need the cmd.exe /c. I believe it can be run just: win32api.WinExec('rar.exe ... or os.system('rar.exe ...
0

Use one antislash before each quotes

win32api.WinExec("cmd.exe /c rar.exe x -o+ -p12345pass temp.rar \"%Localappdata%\\Temp\\\"",0)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.