Downloading folders recursively

Files and folders downloader add-on with resume support.
Post Reply
vlad
Posts: 82
Joined: Sun Jan 04, 2009 6:38 pm

Downloading folders recursively

Post by vlad »

Hi,

I am trying to make the applet download a folder with all the contained files and subfolders. I have "relativefilename" set to "true" and "folderdepth" set to "-1".
The applet makes a "cmd=list" request and my server-side script lists the following:

Code: Select all

<pre>
file 1347446132 3968471 60105e-r5-DA40-D-AFM.pdf<br>
folder 1347468769 4096 Unzipped Files<br>
</pre>
The first item, the file, gets downloaded properly. However, for the second item, the subfolder, it doesn't seem to take into account that it is a folder and it makes the same "cmd=download" request. Please let me know how do I make it list its contents, download the files, etc..? I don't seem to figure that out from the included PHP example script.

Thank you,

Vlad

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Downloading folders recursively

Post by support »

What did you have in "itemi" applet parameters?

vlad
Posts: 82
Joined: Sun Jan 04, 2009 6:38 pm

Re: Downloading folders recursively

Post by vlad »

Only one parameter <PARAM NAME="item1" VALUE="files">, that is supposed to be the root of the folder that needs to be downloaded.

vlad
Posts: 82
Joined: Sun Jan 04, 2009 6:38 pm

Re: Downloading folders recursively

Post by vlad »

(looking forward to receiving some assistance with this, as I am interested in purchasing a license for this applet)

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Downloading folders recursively

Post by support »

and if you try:
<PARAM NAME="item1" VALUE="files/">

vlad
Posts: 82
Joined: Sun Jan 04, 2009 6:38 pm

Re: Downloading folders recursively

Post by vlad »

Same output. The problem is that the applet doesn't seem to care that in the list of files, some items start with "folder" instead of "file" and it is making the following request:

Code: Select all

[POST] => Array
        (
            [cmd] => download
            [val1] => /files/a/
        )
Instead of using "cmd=list" it is using "cmd=download" for folders and of course that fails.

vlad
Posts: 82
Joined: Sun Jan 04, 2009 6:38 pm

Re: Downloading folders recursively

Post by vlad »

Nevermind. I found the problem. The line for a folder was supposed to start with "dir" not "folder". My silly mistake, sorry about that. Thank you nevertheless for the support.

vlad
Posts: 82
Joined: Sun Jan 04, 2009 6:38 pm

Re: Downloading folders recursively

Post by vlad »

Another question. Can I make the applet skip checking the existance of the requested folder inside "/".
Everytime I choose the location for the downloaded files, the applet makes a request to the server with "cmd=list" and "val1=/", even though my param is set to "<PARAM NAME="item1" VALUE="/some/path/of/mine/">". How can I make the applet start with "cmd=list" and "val1=/some/path/of/mine/"?

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Downloading folders recursively

Post by support »

Really? I'm going to check it.

Post Reply