Answers for "get all file names and directory name in a folder python"

12

get files in directory python

import os
files_and_directories = os.listdir("path/to/directory")
Posted by: Guest on June-12-2020
7

list files in directory python

import os
print(os.listdir('/path/to/folder/to/list'))
Posted by: Guest on April-22-2020

Code answers related to "get all file names and directory name in a folder python"

Python Answers by Framework

Browse Popular Code Answers by Language