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

email - PHP mail error ... failed to open stream : permission denied -

sql server - SQL Query - Delete duplicates if more than 3 dups? -

c# 3.0 - Issue with getting 2 chars from string using indexer -