How To Detect File Changes with Python (and send notification)

preview_player
Показать описание
Learn how to detect when a file has changed with a Python program that automatically executes on an interval with a cronjob. Although this tutorial video shows you how to watch PDFs for changes, the concept of comparing file hashes (specifically a SHA1 hash function) holds true for most other files, both local and at a remote URL.

#python #pushsafer
Рекомендации по теме
Комментарии
Автор

Hello how can I use python to monitor for changes on a specific table on postgreSQL and and save that change to csv file . The file should just be touch if and only if the table was updated or some rows were deleted.Thank you

bondkebs
Автор

Great Video, Very expanatory and a very good idea indead. Subscribed Right away!

lkiller
Автор

That's a pretty Good Idea for checking Update like Hashing as I need to check an overwriting file for update on a periodical basis.
Thanks.

saireoflight
Автор

Hi Tony,

Can we detect changes in DataBase?

siwarbgd
Автор

How would you adjust this if you wanted to check PDF updates for every fund in your portfolio?

alexhogg
Автор

hi great video btw you really helped me a lot. Its very beginner friendly and you explain it well. I would like to ask tho how would you run this code online on a platform like heroku or anything similar because if you do this you would have to run your pc 24/7 it would be inffective and would definitely hurt the computer to always check for update by comparing 2 files and saving it locally. Any sugesstions?

Dwika
Автор

is there any option like a webhook, that sends notification immediately as soon as file is chnaged.

venkat
Автор

Is there a way to find out exactly what has been changed and on which line in python

alloydsaviomendonca
Автор

Very good! Do you think a similar setup for matlab is possible? I'm trying to get notification when a website changes.

ludvigmarkgren
Автор

Hi Tony,

Can we detect if a file is added or deleted from a directory the same way?

syedsaifuddintaj
Автор

Hi Tony, Can we detect if only a character is changed?

ronnyzhang
Автор

Hello,
I'm following this tutorial, and it's very helpful.

Now,
for hash_latest=sha1()
You mentioned the entire path for the file (latest.pdf)
I don't want to type the entire path.
I want to use
os.getcwd()
Or
os.path.join(path_dir,

Something that automates the path.
Since all the files will reside in the same directory.

Please suggest how.

megaraitei
Автор

@Tony Teaches Tech make a video on how to make check for updates an application using python.

rohitrawat
Автор

Why bother with hashing tho? Shouldn't just comparing the binary read data be the same thing?

XBlud
Автор

The thing is you don't need to hash if you can just connect to the program that saves the file, and take an input every time it saves.

dimitrygrozny
Автор

pushsafer is giving me a 404 error now ?

arsononemwv