I\'m currently looking at Popen
to automate the compression & storage of documents.
For the compression part, I thought of the following Python line:
In Windows you should use quotes for file or directory names (if you want to use spaces inside). In Python, you should escape quotes with \ symbol (if you are using strings inside " quotes). Like this:
"my name is \"Mark\"!"
Or just:
'my name is "Mark"!'
So this will work as expected:
subprocess.Popen("WinRAR.exe a -r \"c:\\03. Notes\\AllTexts\" *.txt", shell=True)
As well as:
subprocess.Popen('WinRAR.exe a -r "c:\\03. Notes\\AllTexts" *.txt', shell=True)