Answers for "print list of all files in a specific directory python"

7

list files in directory python

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

python list all files in directory

import os
 arr = os.listdir()
 print(arr)
 
 >>> ['$RECYCLE.BIN', 'work.txt', '3ebooks.txt', 'documents']
Posted by: Guest on April-15-2021

Code answers related to "print list of all files in a specific directory python"

Python Answers by Framework

Browse Popular Code Answers by Language