How can I list all files of a directory in Python and add them to a list
?
转载于:https://stackoverflow.com/questions/3207219/how-do-i-list-all-files-of-a-directory
How can I list all files of a directory in Python and add them to a list
?
转载于:https://stackoverflow.com/questions/3207219/how-do-i-list-all-files-of-a-directory
import os
os.listdir("somedirectory")
will return a list of all files and directories in "somedirectory".