Link to home
Start Free TrialLog in
Avatar of butterhook
butterhookFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Python script for checking file modification date

Is it possible that someone could help me with a script that will check a file and see if it's modification date is < X days ago, and if so return true?

I seem to be able to get this date about the file from os.stat, but I'm having trouble getting the current time in a suitable format for comparing.
ASKER CERTIFIED SOLUTION
Avatar of Roger Baklund
Roger Baklund
Flag of Norway image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ghostdog74
ghostdog74

please see here for examples on Python date manipulation

Avatar of butterhook

ASKER

Thanks. Immediately usable.