Created
January 20, 2020 10:07
-
-
Save mmaul8/2ff5b4c8884d4c6619286b191f3b6cdd to your computer and use it in GitHub Desktop.
This script to read the name of all files in a directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| basepath = input("Please input your specific directory : ") | |
| #input example C:\Users\John\Downloads\ | |
| for entry in os.listdir(basepath): | |
| if os.path.isfile(os.path.join(basepath, entry)): | |
| print(entry) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment