Link to home
Start Free TrialLog in
Avatar of Nathan Riley
Nathan RileyFlag for United States of America

asked on

Problem Download Changing Filename

I'm fairly new to this program, but my issue is with the download url.  It is always:


https://website/home/test/ReportRequestKey=5042&SiteKey=438

the ReportRequestKey increases by 1 everytime the sitekey stays the same.

any ideas?
Avatar of Adam314
Adam314

It is not clear what you want to do, nor what language you want to do it in.  Can you clarify...

Something like this in perl will get the file.  You pass the number on the command line;

#!/usr/bin/perl
use strict;
use warnings;
use LWP::Simple;
 
my $Number = shift;
die "Usage: $0 <Number>\n" unless $Number;
getstore("https://website/home/test/ReportRequestKey=$Number&SiteKey=438", 'Report.html');

Open in new window

Avatar of Nathan Riley

ASKER

Well, I'm not for sure as I'm new to this program, but the program itself is a Java Program.  It asking me for the download url and then I can either enter variables or parameters.  He is what is in the window by default when I click to add one:

$%DATE::enter format here%$
ASKER CERTIFIED SOLUTION
Avatar of b0lsc0tt
b0lsc0tt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
What I expect it to do is I will input the beginning URL for the program to go to to download the file which is :

https://website/home/test/ReportRequestKey=5042&SiteKey=438

I will have it scheduled to run everyday and download the file.  The problem is the next time it downloads the file it will be at this URL:

https://website/home/test/ReportRequestKey=5043&SiteKey=438

As you can see the ReportRequestKey keeps increasing by 1.  Here is a screenshot of everything I can input if it helps.

Thanks
Please try again with the screenshot.  That clarification really helped.  Thanks for the response.
Do you use code to tell it to go to the URL?  If so please post that part too (in a snippet) even if it will be seen in the screenshot.
bol
Ok here you go.



https://website/home/test/ReportRequestKey=5042&SiteKey=438

Open in new window

untitled.JPG
The snippet goes into the download URL field
The "image" to the side of the input that looks like the letter S.  What does it do?
Instead of putting it all in the Download URL field try putting just ...
    https://website/home/test/
... in that field and put ...
    ReportRequestKey=5042&SiteKey=438
... in the Parameters field.  What is the result?
bol
Here is what is in that letter S thing.
untitled.JPEG
Was that what appeared for the S thing to the right of the Download URL or which field?  What else do you see in the "Variable Name" pull down on that screen?
Did you try what I suggested?  What was the result?
bol
Gallitin
In my earlier post:
https://www.experts-exchange.com/questions/23833952/Problem-Download-Changing-Filename.html#22788463
I said:
>so the program saves these pages under different names (that is: url name + the incremental number.

Looking at the last picture you posted, it is clear that the program wants a format for the date, but since you didn't insert one, it uses a serial date value, which increments the value by 1.

I think (again, I am not using the program) you can use the following format to give you the date format month/day/year
$%DATE::pp/dd/yy%$

see the end of this page:
http://www.hiteksoftware.com/help/gui/appendfilename.htm
under "Appending Date or Date/Time" heading, for how to use the Date format.

jaffer