Checking files on startup
A few of the files for which I'm responsible at work need to be updated regularly to ensure team members and clients always have access to the latest data. The problem is that each file has a different "expiration", and I'm quite a forgetful person. To solve this issue, I created a simple script to check the last time my files were edited. If a file is expired, I get an alert to update it. This script runs in the background every time I start my computer, so I don't notice it when I don't need it. To do this, let's create a new python file. Rather than ending our file in .py , however, we'll use .pyw . This will ensure our script runs without a console window, meaning it will go unnoticed unless it finds an issue for us to address. Next, we'll add our imports and global variables. We'll create a list of the file paths we want to check and, crucially, we'll establish the maximum age of the files. To kee...