cmd command 'DEL' is not working with subprocess.Popen in python
I am optimizing my script. I have replaced my copy and delete files feature of function with windows commands such as 'ROBOCOPY' and 'DEL'. I am executing this command with help of subprocess.Popen. The 'ROBOCOPY' is working perfectly fine, but 'Del' command is not working.
Here it is my instruction,
subprocess.Popen(["DEL /S /F /Q D:pathtothefile*.LOG"], shell=True, stdout=subprocess.PIPE)
This same command (this exact same string) is working perfectly fine in cmd but it is not working in python. please anyone help me to find my mistake? thank you in advance.
链接地址: http://www.djcxy.com/p/42436.html