python - How to filter files (with known type) from os.walk? -
I have a list from oswalk
. But I want to exclude some directories and files To know how to do this with directories: For the root, darers, files in OS Walk ('C: / My_File / Test') for the file: If the "Update" in the Director: dirs. Remove ("update")
but how can I do this with files, how do I know because it does not work:
if "* .dat" Files in: files.remove ("* .dat")
file = Fi for files in files, if not, then founds (".")]
Comments
Post a Comment