问题
I would like to run the following commands in Python, using the package subprocess.
cd C:\Users\...\csv
attrib +U -P /s
In my mind, I would like to do something like
cmd = [r'C:\Users\...\csv','attrib +U -P /s']
pro = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True)
but this command clearly doesn't work.
来源:https://stackoverflow.com/questions/65449000/how-to-run-two-commands-in-one-subprocess-call