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

Recommended Answers

All 2 Replies

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.