Guest easteregg Posted April 13, 2020 Report Share Posted April 13, 2020 Hi! How do I check a static file link for updates only without downloading? (Headers file size, last modified, e-tag, etc. are present.) If I check 'Do not download, check for updates only' Ketarin always reports an update. If I additionally check 'Ignore file information (do not re-download if file is missing)' Ketarin never reports an update. So what am I missing? Link to comment Share on other sites More sharing options...
shawn Posted April 13, 2020 Report Share Posted April 13, 2020 If you don't have a physical file to compare to and 'check for updates only' is enabled then it will check the size, last modified and e-tag against the record data from the last downloaded file. It will not *update* the information it compares against unless it performs a download. There is a way to work around this and update the stored reference information if you want to manage the downloads externally or don't want to actually download the files at all. This is done by returning exit code 3 in the Before Update command. This is ridiculously easy - you just have to add "exit 3" to the end of the script 'execute the following command before downloading' on the Commands tab. If you're using this to monitor something and want to automate it externally you can use this script to push the new file information to a file, send an email, or anything else you can do with the command line or powershell. Just make sure "exit 3" is the last line. Link to comment Share on other sites More sharing options...
Guest easteregg Posted April 13, 2020 Report Share Posted April 13, 2020 Sorry for the new topic, but how can I answer my own topic, here? Quote If you don't have a physical file to compare to and 'check for updates only' is enabled then it will check the size, last modified and e-tag against the record data from the last downloaded file. It will not *update* the information it compares against unless it performs a download. There is a way to work around this and update the stored reference information if you want to manage the downloads externally or don't want to actually download the files at all. This is done by returning exit code 3 in the Before Update command. This is ridiculously easy - you just have to add "exit 3" to the end of the script 'execute the following command before downloading' on the Commands tab. If you're using this to monitor something and want to automate it externally you can use this script to push the new file information to a file, send an email, or anything else you can do with the command line or powershell. Just make sure "exit 3" is the last line. Thanks, but this doesn't seem to work: In accordance with the wiki, using 'exit 3' only updates 'LastUpdated', i.e. the time when I pressed the update button. It doesn't give me any information about the file itself. So there is no way of monitoring files without downloading or having a local copy? Can I access somehow the headers of the file in Ketarin and save them in a variable to use them? Link to comment Share on other sites More sharing options...
Guest easteregg Posted April 14, 2020 Report Share Posted April 14, 2020 Just in case anyone is interested in it: I solved this by declaring 2 text variables: The first one defines a PowerShell script using Invoke-WebRequest to obtain the headers. The second one actually runs the script and is used as the indicator for changes. So no file download or local copy is needed. If someone knows a more elegant solution, please post it! Maybe it's possible to merge the 3 parts of this topic. Sorry for being to dumb to post them as one. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now