vertigo Posted February 9, 2021 Report Share Posted February 9, 2021 I feel like I'm missing something because this seems like a basic ability that must be there, but I don't see any way to do it. I'd like to be able to set a default directory, perhaps with a {category} subdirectory, for all downloads to go to, so I don't have to manually edit each one and set it. Is that possible? Link to comment Share on other sites More sharing options...
Marc Posted February 24, 2021 Report Share Posted February 24, 2021 https://wiki.ketarin.org/index.php/Special_variables for example {startuppath} if have set mine to {downloads} (File -> settings -> global variables) Link to comment Share on other sites More sharing options...
shawn Posted February 26, 2021 Report Share Posted February 26, 2021 I use the following download file pattern for almost all my apps: ..\{category}\{appname:regexreplace:([\s\t\r\n\-\&]+):_}-{version}.{url:ext} This downloads to the directory above where Ketarin is running from, into a folder named for the Category, using the "Application name" field value, sanitizing it for troublesome characters, then a hyphen and the value of the version (automatically generated in FileHippo downloads, manually parsed otherwise), then a dot and the extension of the file. Sometimes these rules are inappropriate, for example if it's a tar.gz file or you want to add more information to it, like bit-type or OS compatible version, or if there isn't really a "version" per se. In these cases you just need to modify the template. For files without versions I use a timestamp instead ({f:yyyy}{f:MM}{f:dd}T{f:HH}{f:mm}{f:ss}). The most important thing is to be consistent. Setting them all up consistently is a heck of a lot easier if you start that way or only have to fix a dozen or two than it is after you have 700+ (speaking from experience). Link to comment Share on other sites More sharing options...
vertigo Posted April 11, 2021 Author Report Share Posted April 11, 2021 Oh great, another forum that doesn't email me like it's supposed to when I get replies... I looked at the special variable page, but I still don't see how to do what I want, and based on your answers, I'm guessing it's not possible, which is crazy. When I add a new program, and I edit it, I can't hit ok because it tells me I need to set a download location. What I want is for this to always, on every newly created entry, to be filled in automatically with a path I specify, perhaps with path\{category}. If I'm understanding your responses correctly, I can create a variable called, e.g., {downloads} and specify it as that (path\{category}), but I'd still need to then manually enter {downloads} in every new item. Another thing that seems like it would be frustrating going through creating dozens/hundreds of items is that you can't set which action when clicking the "Add new application" button is the default, so to import from online database, which seems like it would be the easiest way, as theoretically it's already configured (though every time I've tried it's not, so I have no clue what the point of it is), you have to click the drop-down arrow and select that every...single...time. There's not even a key shortcut like there is for new application (Ctrl+N), so that option can be accessed either via a key combo or clicking the button, whereas the option that seems like it would be more useful requires two clicks either way. Seriously, am I just really not understanding this program, or is it much more complicated to use than it should be? Link to comment Share on other sites More sharing options...
shawn Posted April 11, 2021 Report Share Posted April 11, 2021 We both gave you answers to accomplish your request using advanced options. Perhaps we need to show you the simplest method: Click the "Add new application" button. In the resulting New Application window: 1) Select either "save to file" or "save in folder" as the default behavior. 2) Enter the path or filename ({variables} OK!) 3) Click "Save as default" Every new application you create after this point will use these settings. Any other aspects you assign before clicking "Save as default" will also be assigned to new applications, such as category, new default variables, download source/URL and so on. Link to comment Share on other sites More sharing options...
shawn Posted April 11, 2021 Report Share Posted April 11, 2021 The mailing function in the forum works fine as long as you're not blocking it. I received notification about your comment within 10 minutes of you posting it. Consider whitelisting 136.243.175.196, 138.201.250.173, and 138.201.207.69. These are the three IP addresses used by the Ketarin forum in the last couple years. Link to comment Share on other sites More sharing options...
vertigo Posted April 11, 2021 Author Report Share Posted April 11, 2021 (edited) Ok, so since I was using the import from online database function, and that doesn't have the save as default button, that's why I wasn't figuring it out. It's really the type of thing I would expect to be in settings, not as an addition to the main interface, and certainly not in some windows but not others. Also, the use of two separate options to save to file or save in folder is a bit unusual and confusing. And since your example shows save to file being used, I tried that, but then it wouldn't let me just choose the folder (obviously) or enter "{category}\{appname:regexreplace:([\s\t\r\n\-\&]+):_} {version}.{url:ext}" as the file, so I canceled, selected save in folder, navigated to the folder and selected it, then appended that to the end of it and changed it back to save to file (not sure if that part was needed, but I can't find anything on the difference, so I'm assuming save in folder will interpret the whole string as a folder). Just seems unintuitive and like it could be easier. So is there a way to make the import from online database option the default? And is the online database just a wild west type thing where people just create whatever and add it? Because a lot of them hardly have anything in them, just the name and category and {url} or {download_url}. Figured it out, am going through creating new entries, though still have to figure out how to determine the appropriate install commands/switches, and how to upload them so others can use them. As for not getting the emails, I've had it happen before with at least one other forum, though it's rare. I'm not blocking it, and I receive other mail. I use a mail forwarding service, and it doesn't even show receipt of anything from here, so I'm not sure what the problem is. I'll check and make sure the service isn't blocking those IPs for some reason. Edited April 12, 2021 by vertigo updating info Link to comment Share on other sites More sharing options...
vertigo Posted April 12, 2021 Author Report Share Posted April 12, 2021 I tried setting global variables for the path and filename, e.g. path=path\to\save\files\{category}\ and filename={appname:regexreplace:([\s\t\r\n\&]+): } {version}.{url:ext} but variables inside of variables don't seem to work, and everything is taken literally. It would be great if this could work, since then if it ever needed to be changed it could just be changed there and that would affect everything, but I've tried escaping the braces and it doesn't help. Is this possible? Link to comment Share on other sites More sharing options...
shawn Posted April 13, 2021 Report Share Posted April 13, 2021 There is a difference between "save in folder" and "save to file", and this is why you can select only one of those options. "Save in folder" allows you to specify the folder path that you want to save the downloaded file to. You can use a relative folder or explicit folder and you can use variables in the folder name. The file that is downloaded will be saved with the filename assigned by the server. You'll end up with something like ".\your\path\setup.exe" or "your\path\tails.iso". Notably, if the original filename does not include the version number or language, and you want to include these details in the resulting filename, it will not be included. "Save to file" allows you to specify the complete path including filename. Used with functions you can parse the original filename pattern to ensure you're assigning the right extension, then you can store much more detail within the filename. Speaking of functions, yes, you can use many in series or as part of a collection. Moreover, you can use the variables feature to assemble more or in a multi-step process to format variables how you want to use them based on the need. 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