Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to get a list of files in a folder in python with pathlib

import pathlib
import os

directory: pathlib.Path = some/path/_object
for file in os.listdir(directory.__str__()):
  file_path: pathlib.Path = directory / file
  pass
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #list #files #folder #python #pathlib
ADD COMMENT
Topic
Name
5+7 =