Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python code to get all file names in a folder

#import OS
import os
 
for x in os.listdir():
    if x.is_file():
        # Prints only text file present in My Folder
        print(x)
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #python #code #file #names #folder
ADD COMMENT
Topic
Name
4+7 =