I am writing a script that lists number of lanes, words in text files and now I want to add looking for duplicates.
right now I am using this to list all the text files in a directory:
from sys import argv
script, directory - argv
files = glob.glob(directory + "/*.txt")
If there are any sub-folders in the directory it will not list those files. How can I do it so that it lists all files from all sub-directories as well?
You can see Python recursive folder read
and
Use a Glob() to find files recursively in Python?
These are useful posts with solutions and great explanation
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments