Jump to content
Ketarin forum

Help a newbie with a url variable


mikeparkie
 Share

Recommended Posts

I'm getting to grips with Ketarin and its mostly excellent. I think i'm the problem.

 

I cant seem to get this package to work when i set the url up.

 

Original

http://sourceforge.net/projects/sabnzbdplus/files/sabnzbdplus/sabnzbd-0.5.6/SABnzbd-0.5.6-win32-bin.zip/download

 

I've modified to use the version:

http://sourceforge.net/projects/sabnzbdplus/files/sabnzbdplus/sabnzbd-{version}/SABnzbd-{version}-win32-bin.zip/download

 

Also when i create a rule to unzip a package to a certain location, what command do i need to use to copy the extracted files to another location. e.g. i download 7zip and it saves it to "d:\my software" and extracts it to "c:\program files\{app name}" but i would also like to exract it to "d:\my portable apps"

 

Hope that makes and thanks in advance for any help.

Link to comment
Share on other sites

Use this URL:

http://mesh.dl.sourceforge.net/project/sabnzbdplus/sabnzbdplus/sabnzbd-{version}/SABnzbd-{version}-win32-setup.exe

 

Get version number from here(Way faster than regular download page):

http://mesh.dl.sourceforge.net/project/sabnzbdplus/sabnzbdplus/?C=N;O=D 

- this wont load fast in browser but it will in Ketarin.

 

For 7z you can either run 2 nearly identical commands in a row:

7z x -aoa -y "{file}" -o"c:\program files\{app name}"
7z x -aoa -y "{file}" -o"d:\my portable apps" 

 

...Or you can use windows's own copy command to copy the extracted files to other places(saves time when the original archive is big and running two extractions with 7z could take time).The first line is so that the system wont prompt you to procceed in case there are multiple files.Othewise you have to manually enter Y all the time.

SET COPYCMD=/Y
copy /Z /V "source file" "destination"

Link to comment
Share on other sites

Thanks Tomorrow, the new url worked as you expected and I was able to trigger the download, so thank you very much for that.

 

I'm stuck on part two of my post. I though it more efficient to use the windows command to copy the folder and its contents but this doesnt seem to be working.

 

The package downloads and successfully extracts to "d:\ my portable apps" but the copy command doesn't copy if over to prog files.

 

Here's what I have in the commend section of the rule:

 

(1) 7z e "{file}" -o"D:\My Portable Apps\{appname}" -y

(2) SET COPYCMD=/Y

(3) copy /Z /V "D:\My Portable Apps\WinSCP" "C:\Program Files (x86)\WinSCP"

Link to comment
Share on other sites

Thanks Tomorrow, the new url worked as you expected and I was able to trigger the download, so thank you very much for that.

 

I'm stuck on part two of my post. I though it more efficient to use the windows command to copy the folder and its contents but this doesnt seem to be working.

 

The package downloads and successfully extracts to "d:\ my portable apps" but the copy command doesn't copy if over to prog files.

 

Here's what I have in the commend section of the rule:

 

(1) 7z e "{file}" -o"D:\My Portable Apps\{appname}" -y

(2) SET COPYCMD=/Y

(3) copy /Z /V "D:\My Portable Apps\WinSCP" "C:\Program Files (x86)\WinSCP"

Yep my fault.Copy command can only copy files not directories or directory trees.For this you need to use xcopy:

SET COPYCMD=/Y
xcopy "D:\My Portable Apps\WinSCP" "C:\Program Files (x86)\WinSCP" /S /V /I /Z /K

 

More info on windows commands here: http://ss64.com/nt/

Edited by Tomorrow
Link to comment
Share on other sites

  • 2 weeks later...

thanks for the follow up and sorry for my delayed reply.

 

I just want to clarify the instructions as I'm going wrong somewhere.

 

I have created a copy of my Ketarin profile so that I can play around with messing up my working version.

 

So in 3rd tab 'commands' I have the following

 

(1) 7z x "{file}" -o"D:\My Downloads\ Temp\00-Ketarin Test\My Portable Apps\{appname}" -y

(2) SET COPYCMD=/Y

(3) xcopy "{root}\My Downloads\ Temp\00-Ketarin Test\My Portable Apps\{appname}" "C:\Program Files\ztest" /S /V /I /Z

 

couple of side questions

1. Can i use {appname} in the xcopy line?

2. some websites don't contain a version, but the file version does. Can i use the 'File Version' from the 'File Property'

 

again, thanks very much for any help with this excellent app :)

Link to comment
Share on other sites

couple of side questions

1. Can i use {appname} in the xcopy line?

2. some websites don't contain a version, but the file version does. Can i use the 'File Version' from the 'File Property'

1. I think so.Ketarin should replace this with the actual name before passing it to xcopy.

2. Im afraid that's not possible.Atleast as far as i know.Use:

{f:dd}.{f:MM}.{f:yyyy}

instead (In {version} textual content).Note that for this to work(at the moment) the file needs to be downloaded atleast once since the date is taken from a local file.So this won't work for any new apps you create.I use this when the app does not have any coherent version number.You can use your own preffered date format by combining the commands: http://wiki.ketarin.org/index.php/Special_variables

 

EDIT: You can also set textual content to specific version number.Let's say the app does not have version number anywhere but it has progressed like 2.0 - 2.1 and so on and so you can set it to 2 or v2 to reflect the major version number.

Edited by Tomorrow
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.