I am working on a python code that is supose to search a directory and see if a file in the directory has a add or a update and to change a few fields in my code that call the add and updata and change the directory name to match it. Is there a way to do that which is simple and easy for a new python coder to understand. If you need my code i will post it also

4 Years
Discussion Span
Last Post by abaddon2031

You can tell if a file has been changed by the size of the file and date. Check the os.stat module. st_size will give you the size. And one of the getxxtime in os.path will give you the time there is more than one


I fount the answer. It is best to use the fnmatch useing this did just what i wanted glob to do in a much more compact and simpler form.

Edited by abaddon2031: spacing and grammatical errors

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.