Horje
python get newest file in directory Code Example
python get newest file in directory
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.getctime)
print(latest_file)




Python

Related
download pdf from url python Code Example download pdf from url python Code Example
download pdf from link using python Code Example download pdf from link using python Code Example
code how pandas save csv file Code Example code how pandas save csv file Code Example
matplotlib x label rotation Code Example matplotlib x label rotation Code Example
exception get line number python Code Example exception get line number python Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7