473,671 Members | 2,501 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem downloading multiple files

I have n files sequentially named sitting on a server that I want to
download to my local machine.

file1.jpg
file2.jpg
file3.jpg

The script downloads only the last file, e.g., in this example, only
file3.jpg is downloaded.

imgCode = 'file';
imgCnt = n;

for (i=0; i < n; i++) {
imgName = imgCode + i + ".jpg";
window.open(img Name);
}

When I put an alert in the loop (imgName), it correctly showed the three
filenames, but still only downloaded file3.

Clues?
--
Ed Jay (remove 'M' to respond by email)
Apr 5 '07 #1
2 2108
"Ed Jay" <ed***@aes-intl.comwrote in message
news:0v******** *************** *********@4ax.c om...
>I have n files sequentially named sitting on a server that I want to
download to my local machine.

file1.jpg
file2.jpg
file3.jpg

The script downloads only the last file, e.g., in this example, only
file3.jpg is downloaded.

imgCode = 'file';
imgCnt = n;

for (i=0; i < n; i++) {
imgName = imgCode + i + ".jpg";
window.open(img Name);
}

When I put an alert in the loop (imgName), it correctly showed the three
filenames, but still only downloaded file3.
http://foomanchu.com/ol.htm

As far as I know, allow foomanchu.com to open popups and that should be the extent of
Firefox's complaints. As I have everything in the JavaScript section disabled and the
above example works just fine.

-Lost
Apr 5 '07 #2
-Lost scribed:
>"Ed Jay" <ed***@aes-intl.comwrote in message
news:0v******* *************** **********@4ax. com...
>>I have n files sequentially named sitting on a server that I want to
download to my local machine.

file1.jpg
file2.jpg
file3.jpg

The script downloads only the last file, e.g., in this example, only
file3.jpg is downloaded.

imgCode = 'file';
imgCnt = n;

for (i=0; i < n; i++) {
imgName = imgCode + i + ".jpg";
window.open(img Name);
}

When I put an alert in the loop (imgName), it correctly showed the three
filenames, but still only downloaded file3.

http://foomanchu.com/ol.htm

As far as I know, allow foomanchu.com to open popups and that should be the extent of
Firefox's complaints. As I have everything in the JavaScript section disabled and the
above example works just fine.
Perfect! Thanks.
--
Ed Jay (remove 'M' to respond by email)
Apr 5 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2430
by: Bala | last post by:
Hi I am trying to download the PDF files from my webserver using ASP.Net. All my files are stored at F Drive on webserver. Like this F:\Main Folder\Sub Folder\Files\File1.pdf I am impersonating the domain user account and downloading the file, It seems the impersonate is got success, but its not download the file. Its simply downloading some junk pdf file instead of original file.
1
2070
by: just.starting | last post by:
Hi, My dot net client downloads files and checks for any new files time to time. The server is apache2.0.53 server. So what happens is that my file download thing works fine if I dont try to call any page from the server while downloading. If I try to call a single page while downloading a file then the page request goes time out and the server then closes the existing download stream and the client doestn't throw any exception. So many a...
5
5958
by: fniles | last post by:
We created an ActiveX control and marked it as safe for scripting using Implements IObjectSafety. We then created a CAB file and signed it using Verisign. We also created a license file (LPK file) for it. We use this control on an ASP page. We put the CAB file for the AX control and VBRun60.CAB in the same folder with all the ASP files. When we call the ASP page using any machine with IE 6 SP2 (we tried it with multiple IE6 SP2...
0
1635
by: just.starting | last post by:
I am having problem while downloading files from an apache server2.0.53 with php4.3.10.While downloading some files it generally stops after downloading some specific amount and then stops downloading with the error message: "the source file could not be read". And the error is not dependent on the size of the file, as I can download a file of 6MB but having problem with a file with 652KB. It always stops after 666880bytes. Thanks.
2
5176
by: Andrew Trevorrow | last post by:
Our app uses embedded Python to allow users to run arbitrary scripts. Scripts that import Tkinter run fine on Windows, but on Mac OS X there is a serious problem. After a script does "root = Tk()" our app's menus are permanently changed in the following way: - The top item in the application menu changes to "About Tcl & Tk...". - The Quit item is disabled. - The File and Edit menus are completely replaced. - All further menus (except...
4
2007
by: PiotrKolodziej | last post by:
hi I have a thread that downloades a file. Problem is : Not all files are beeing downloaded. I observed that only the small files are beeing downloaded correctly. I also cant download two files in a row. I got to Exit and run the program again to even start downloading. The second problem i interprett as iam not closing something ( but don't know what ). For the first problem i have no idea what is wrong.Here is the download thread Maybe...
1
1492
by: Maury | last post by:
Hello, I would like to download multiple files with one click in a web form link, I know how to download a single file, and I think that a solution is to zip all the files in an archive, and then downloading it, but I'm looking fo another solution, do you think that is is possible another way? Thanks! ..:M:.
3
1735
by: Ritesh Raj Sarraf | last post by:
Hi, I have, for very long, been trying to find a consistent solution (which could work across major python platforms - Linux, Windows, Mac OS X) for the following problem. I have a function which downloads files from the web. I've made the function threaded. I'm trying to implement a progress bar for it which could work across all the platforms.
35
9347
by: keerthyragavendran | last post by:
hi i'm downloading a single file using multiple threads... how can i specify a particular range of bytes alone from a single large file... for example say if i need only bytes ranging from 500000 to 3200000 of a file whose size is say 20MB... how do i request a download which starts directly at 500000th byte... thank u cheers
6
1599
by: manjitsarma | last post by:
I want to create a functionality for downloading multiple files from the server. User can check multiple files and then when he selects download button it should download all the selected files automatically. Please help me in this regard.... Thanks Manjit
0
8478
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8397
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8821
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7439
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6230
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4225
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4409
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2813
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2052
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.