Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Problems with downloading multiple files

    Hi all,

    I'm trying to find a way to download multiple files without having 10 pop up download windows appearing. Is there a way to have one pop up window and download the multiple files individually without zipping them?

    If that is not possible, I would like to tar all the files the user selected without using the php function by using popen and execute the command "tar -cfv file.tar file1 file2 .." I tried to use the tar function but it seems to be giving me inconsistent behaviour. The pop up window does not always appear even though the tar file is in the directory. Any ideas or suggestions would be greatly appreciated! Thanks in advance.

  • #2
    Regular Coder
    Join Date
    Mar 2005
    Location
    Moscow, Russia
    Posts
    207
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm trying to find a way to download multiple files without having 10 pop up download windows appearing. Is there a way to have one pop up window and download the multiple files individually without zipping them?
    Hi, no, using only one file (either tar or other archive format) containing e.g 10 files. Another way is to use client side applet (Java or ActiveX) which downloads 10 files without any pop ups

    If that is not possible, I would like to tar all the files the user selected without using the php function by using popen and execute the command "tar -cfv file.tar file1 file2 .." I tried to use the tar function but it seems to be giving me inconsistent behaviour.
    What's wrong with tar command? Why don't use shell gzip or CXLI. Zlib Compression Functions, or you also need to store file/directories permissions?

  • #3
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi .. thanks for your help =) I guess I will just have to make an applet if I want to send multiple files. As for the second case, I think IE just have a different header than Firefox so it is not recognizing what to do with the tar command.

  • #4
    Regular Coder
    Join Date
    Jul 2004
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I might not be understanding you correctly, but how would the browser have any effect on the server side script? If the PHP is EXEC'ing the files into a .tar or .zip etc., then I'm not clear on why this method wouldnt work?

  • #5
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm not exactly sure why either. It is very puzzling to me as well. It should not be browser dependent but when I execute the tar command in php, I return the pclose() exit status. On Firefox, there is no problem, it returns 0, but on IE, the same command, same file, it returns 126 if I select more than one file to download and 2 if one file is selected. I even tried it with a 'cp' command and again on IE, it doesn't return 0 but 126.

    I haven't resolved the problem yet but I think I will switch over to downloading individual files without taring it since space is an issue. Now I am assume my only way is to use an applet to download these files into individual files, right? If so, does any one have any good samples or links as to how I can accomplish this? I've tried to search other forums and google but haven't had much luck.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •