Jump to content
Ketarin forum

Not Downloads Path File Name Check


a2855158
 Share

Recommended Posts

Hi,

 

Firstly, sorry my English.

 

I want to make new update check system. Example Keratin in my desktop but my apps in other folder (not download folder), keratin check file name in folder.

 

 

My apps folder:

 

"D:\Myapps\Winrar 4.20.rar"

 

Keratin checks old version and write in column like that {old version}

 

And it compare them.

 

Can you create it?

 

 

 

Link to comment
Share on other sites

It sounds like you're wanting to effectively import the external files into the versioned structure supported by Ketarin.

 

Currently Ketarin stores it's own version numbers for those apps it's downloaded and those that have been downloaded through an external downloader. The external file name is stored in the database as well, and is composed from the "save to file/folder" option on the Application tab. If you're using a standard destination file pattern that includes the version number then this is a pretty simple setup. I personally use this as my "save to file" structure:

 

..\{category}\{appname:regexreplace:([\s\t\r\n\-\\&\/]+):_}-{version}.{url:ext}

 

Now, you could parse the version number from a remote source (assign it to a new variable named "version"), then use the pre-update script feature to parse for the destination file presence, and if it already exists return "exit 3", which means that an update has been performed "outside" (such as through an external downloader or from a local file repository). This could be done with something like this, if you're using the same destination pattern I am above:

 

 

if exist "..\{category}\{appname:regexreplace:([\s\t\r\n\-\\&\/]+):_}-{version}.{url:ext}" exit 3

 

This would work for you if your folder structure was based on categories and your file was named "D:\Tools\Winrar-4.20.rar", for example. If you don't want the category as part of the destination path and don't like the dash in the filename then you can tune those to your specific needs.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.