Jump to content
Ketarin forum

2 Items: Reporting & Archiving


NerdZone
 Share

Recommended Posts

I just had a few thoughts of functionality improvements I would like to see:

 

Reporting - It would be nice to have a report (possibly HTML) automatically created at the end of an multi-update process that list all the "Applications" that have been updated (and possibly include custom version variables). Kinda like having a running changelog of the user's repository in an HTML file.

 

Archiving - It would also be nice to have the ability to archive an old "Application" (ie. copy/move it to an "Archive" folder) if a new version is detected and before it is downloaded.

 

Just my 2 cents (a penny each) :) ...

 

Great App!! I love it!!! 108 Apps & counting!

Edited by NerdZone
Link to comment
Share on other sites

Awesome! Thanks!

 

That leads me to another question:

Say each App <TargetPath> folder has a "~~Archive" directory in it for historical value/backup. So if I run the following in the "Execute the following command before downloading" section:

 copy "{file}" "<TargetPath>\~~Archive\." /y

The {file} would be copied into it's respective "~~Archive" folder before an update took place.

 

The problem I'm running into is simplifying the syntax of the copy command. Specifically, with the <TargetPath>. Just to confirm: there is no variable that holds each app's TargetPath (or "Download location") value?

 

I also tried:

 copy "{file}" ".\~~Archive\." /y

Going with the assumption that each app job works in it's respective TargetPath directory... No Dice.

 

So do I have to edit each job and enter the full unique TargetPath for each copy command?

 

I'm just wondering if I'm missing something.

Thanks in advance.

Edited by NerdZone
Link to comment
Share on other sites

Just to confirm: there is no variable that holds each app's TargetPath (or "Download location") value?

Yes there is, for path most of us are using {target}\{category} (or {target}\{category\class}). "target" is a global variable (sample value= "C:\"), "category" and "category\class" are regular variables.

It would also be nice to have the ability to archive an old "Application" (ie. copy/move it to an "Archive" folder) if a new version is detected and before it is downloaded.

Lets get back on this one. :) No, you don't have to edit each job and enter the full unique TargetPath for each copy command - you can use "generic commands" for archiving using built-in variables. Let's assume your file, e.g. the older file you wish to archive, as filename generated by

{appname}_{version}.{url:ext}

You can use

move {appname}*.* {target}\{category}\{appname}\

For archiving. Or replace move with copy, and you might as well use Windows Environment Variables for more complex stuff. This is very flexible. For instance, two of the command pairs I use the most are (this is XML, careful)

<ExecuteCommand>{rem} mkdir {a}{appname}\ & {7z}7z x "{file}" -o{a}{appname}\ -y</ExecuteCommand>
<ExecutePreCommand>{rem} del /s /q {a}{appname}\*.*</ExecutePreCommand>

And (I have ~70-80 jobs with these)

<ExecuteCommand>{rem} copy /y "{file}" {shared}</ExecuteCommand>
<ExecutePreCommand>{rem} del /q {shared}\{appname}*.*</ExecutePreCommand> 

If this doesn't help please post the specific command you are trying to use. ;)

Edited by FranciscoR
Link to comment
Share on other sites

Did some testing with "directory" and "filename" functions and end result is more or less the same. They might be your (or others) cup of tea though, implementation is more recent than the above cited variables, sintax using {file} variable (with other variables will be different, see documentation) is {file:directory} and {file:filename}.

 

If {file} returns

D:\Programas\Extensions\Firefox\GoogleEnhancer_1.70.xpi

{file:directory} returns (no ending slash?)

D:\Programas\Extensions\Firefox

and {file:filename}

GoogleEnhancer_1.70.xpi

 

For instance using {file:filename} to replace {appname}_{version} in my older script

{rem} echo %DATE% %TIME% {file:filename} >> {target}\Updates.txt & {rem} tree {target} /f /a > {target}\List.txt

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