Python3 - Deleting dirs after finishing a commando prompt
Posted
by user302935
on Stack Overflow
See other posts from Stack Overflow
or by user302935
Published on 2010-03-28T22:54:35Z
Indexed on
2010/03/28
23:03 UTC
Read the original article
Hit count: 376
I have a python script that ends with running a program (iexpress.exe) in a dos prompt.
The program that runs in dos prompt, uses a dir called workdir.
After the program has finished in the dos prompt I would like python to delete the dir.
I have just made a simple solution of putting a delay of 30sec:
time.sleep(30)
removeall(workdir)
os.rmdir(workdir)
But how should I do it, if python should delete the dir right after the process has finished?
© Stack Overflow or respective owner