appyface Posted November 17, 2008 Report Share Posted November 17, 2008 Hi Flo, I have a regular download with the same download name over and over, and no versions to scrape for this file. The version is really only that the author mentions on another webpage, an updated date like "Updated: November 12, 2008". This is the only way I know the file has been updated. (I use WatchThatPage to monitor my webpages for updates. Great service with few outages over the years, I'm very glad to give these guys a plug. Unpaid and unsolicited endorsement, I'm just a happy customer.) Right now I manually download this "versionless file" and I add a sortable date to the downloaded name, e.g. I save "utilities.zip" as "utilities_20081112.zip" since I can see "November 12, 2008" on the webpage with the change information. For Ketarin, I know I can fiddle with variables to do this. But since Ketarin also preserves the server's modified date on the downloaded file when possible (thank you!!! thank you!!!), could Ketarin have a built-in variable with the modified date? I would like to pick that variable apart with the typical date formatting sub-variables: YYYY and YY (with and without century) MM and MMM (numeric with leading zero or 3-char month name) DD and DDD (numeric with leading zero or 3-char day name) For me the modified time field is not required but if it is easy to do it could be useful, if someone is trying to construct a date/time stamp for the filename, such as: yyyymmdd_hhmmss While I'm here asking, it would be handy to have the receiving PC's system's date (and possibly time) available with subformatting variables as well... Sometimes that's the only "version" available to use for the file. Thanks as always for consideration of the ever-growing wish list for Ketarin. Best, --appyface Link to comment Share on other sites More sharing options...
floele Posted November 17, 2008 Report Share Posted November 17, 2008 (edited) I'll add the useful variables from "Custom date formatting" on http://blog.stevex.net/index.php/string-formatting-in-csharp/ . Edit: We'll use {dd} for the system date and {f:dd} for the file's date. Edited November 17, 2008 by floele Link to comment Share on other sites More sharing options...
appyface Posted November 18, 2008 Author Report Share Posted November 18, 2008 (edited) Neat article, thanks Flo! Just to make sure I understand the use of the implementation in Ketarin. I refer to the constructs shown in the article, with {} (curly braces) around them, same as I would a variable I defined myself in Ketarin? (With the f: prefix if I want to refer to file's modified date rather than the system date) So my constructed file save path, for the example I referenced in above post, is this (if I wanted to save the file to my t:\somedir directory): t:\somedir\utilities_{f:yyyyMMdd.zip and the actual file name saved on disk becomes: t:\somedir\utilities_20081112.zip ???? Please correct my understanding of how to use the new constructs if this is incorrect. Thanks!!! and regards, --appyface Edit: Whoops it occurs to me I might instead need to use: t:\somedir\utilities_{f:yyyy}{f:MM}{f:dd}.zip True? TIA :-) Edited November 18, 2008 by appyface Link to comment Share on other sites More sharing options...
floele Posted November 18, 2008 Report Share Posted November 18, 2008 Yes, the last one seems correct. Feel free to just try it btw. Link to comment Share on other sites More sharing options...
appyface Posted November 18, 2008 Author Report Share Posted November 18, 2008 So it is already available in the latest download of Ketarin? Cool I'll give it a try... thanks! --appyface 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