rm

Calling rm from subprocess using wildcards does not remove the files

Calling rm from subprocess using wildcards does not remove the files Question: I’m trying to build a function that will remove all the files that start with ‘prepend’ from the root of my project. Here’s what I have so far def cleanup(prepend): prepend = str(prepend) PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__)) end = “%s*” % prepend cmd = …

Total answers: 3