Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

get lastest files from directory python

import glob
import os

list_of_files = glob.glob('/path/to/folder/*') # * means all if need specific format then *.csv
latest_file = max(list_of_files, key=os.path.getmtime)
print(latest_file)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #lastest #files #directory #python
ADD COMMENT
Topic
Name
4+7 =