I am new to scripting and trying to write a python script to remove a few files.. Here is the path Multiple scripts/script*
Main directory: Multiple scripts
sub directories: script1
script2
script3
In each script in subdirectories, I have file consists of mem. Since I don't know what they start with or their extension now I would like to write a script to search all the subdirectories and delete files that consists of mem.
I tried using the following code but did not work for me
import os
if Multiple scripts/scripts*
os.remove(*/mem*)
else:
print ("file does not exists")
And also please help me with how to write a script to delete files with multiple names (/mem, /name) at a time. Any help would be appreciated... Thank you