Page 1 of 1

Downloading archives and relative paths

Posted: 16 Apr 2011 13:17
by tomuser
I'm trying to make a script/button which could download new file updates from different webistes and one request is also to extract archives to different locations. But I faced with several problems.

1) I'm using such command:
download "http://www.website.com/downloads/stuff.exe", "..\..\downloads\stuff (<date yyyy-mm-dd>).exe"
download "http://www.newsite.com/stuff.rar", "..\..\otherdownloads\stuff (<date yyyy-mm-dd>).rar"

If running this command it gives me kind of pop-up menu which forces me choose which one I want download (command selection). How can I set it such way that it would automatically run both commands?

2) Other problem what I discovered is that it is dependent on which drive and folder I am currently. In some situations it says folder not found becuase it will double some folders in pathways (ie. \downloads\downloads\). How can I use relative paths starting from XYplorer folder no matter which hard drive and folder is currently selected?

3) When first two are fixed then I need additional command for some archive files which would download file, extracts its content to specified folder and then deletes archive file itself.

Thanks in advance

Re: Downloading archives and relative paths

Posted: 16 Apr 2011 13:37
by admin
1) Indent all non first lines:

Code: Select all

download "http://www.website.com/downloads/stuff.exe", "..\..\downloads\stuff (<date yyyy-mm-dd>).exe"
  download "http://www.newsite.com/stuff.rar", "..\..\otherdownloads\stuff (<date yyyy-mm-dd>).rar"
2) Use <xypath> to refer to the (unslashed) path of XYplorer.exe

Re: Downloading archives and relative paths

Posted: 16 Apr 2011 14:02
by tomuser
download "http://www.website.com/downloads/stuff.exe", "<xypath>..\..\downloads\stuff (<date yyyy-mm-dd>).exe"
download "http://www.newsite.com/stuff.rar", "<xypath>..\..\otherdownloads\stuff (<date yyyy-mm-dd>).rar"

Adding <xypath> to target folder path works nomatter wherever I am (though path looks very long and ugly (first Xyplorer path and then relative path also in the end) :P).

But when adding space before second download command line then it cannot find path. It creates something like this D:\F:\ when I am in other disk drive. And when in same disk then it it wants to dowload to path with doubleing this part in target path in which folder I currently am :/.

Re: Downloading archives and relative paths

Posted: 16 Apr 2011 14:06
by admin
Statements have to be terminated with ;

Code: Select all

download "http://www.website.com/downloads/stuff.exe", "..\..\downloads\stuff (<date yyyy-mm-dd>).exe";
  download "http://www.newsite.com/stuff.rar", "..\..\otherdownloads\stuff (<date yyyy-mm-dd>).rar";

Re: Downloading archives and relative paths

Posted: 16 Apr 2011 14:10
by tomuser
(F)excellent

Now diving into third part of request.

Edit: I discovered something bad again with multidownload. If there is download commad to file which doesn't exist (some are using dates in filenames and xyplorer date command works well with these, but updates are not made in every day and therefore not in web) and get URL not found error. If I press continue where it should be going to download next file it won't do it. Or it actually goes to next file, but says also for this file that URL not found though this file actually exists and it works ok when command to this file is before command to really missing file. Seems like a bug.

Re: Downloading archives and relative paths

Posted: 17 Apr 2011 12:00
by tomuser
...or feature?

Re: Downloading archives and relative paths

Posted: 17 Apr 2011 12:16
by admin
tomuser wrote:...or feature?
Bug! Thanks, fix comes.

Re: Downloading archives and relative paths

Posted: 17 Apr 2011 14:52
by tomuser
Nice!

Is there any command which could continue script if no file was found with next dowload commands without pressing continue manually so I could just run script and go away and everything which is available will be downloaded?

Re: Downloading archives and relative paths

Posted: 17 Apr 2011 15:13
by admin
tomuser wrote:Nice!

Is there any command which could continue script if no file was found with next dowload commands without pressing continue manually so I could just run script and go away and everything which is available will be downloaded?
No. But it would make sense. Maybe I'll add something.