I am looking for a way in which I can get the latest modified file in a folder using Python.
I have tried looking online for some solution but have had no luck so far with the OS module in Python. Maybe there is another module I should be using? This is my code so far:
os.listdir('G:\\Data\\Hotels\\FTP\\Hotel Data\\IDEAS')
From this list I want the last modified file. I am new to Python, so not sure what modules are available to me in order to look at the time modified for each file.