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

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -