May-02-2024, 03:57 AM
Greetings!
I need to filter files by file names, sort by the last modification time and process them.
I got this code but it does not work.
Could you help me with this?
Thank you.
I need to filter files by file names, sort by the last modification time and process them.
I got this code but it does not work.
import glob, os pt = "C:/PS_Power-Shell_scripts/Files/File.*" all_files = glob.glob(pt) all_files.sort(key=lambda x: x[1], reverse=True) for file in all_files : print(f" -- {file}")
Could you help me with this?
Thank you.