Given that I'm trying to automate the process of uploading 20-30 files at a time (and I have to do this regularly), and the filenames are always the same each time (eg. it's always file1.gif, file2.gif, etc), is there some way I can automate this using php? At present, I have a simple form which uploads one at a time, but obviously at this stage I have to keep going back and choosing the file again and again. Is there some way I can tell the script where to get each file without using the browse/upload form as per normal? And then perhaps once it's uploaded the first one, automatically upload the next, and keep going until all the files are done? ftp is not an option. security is not an issue as this is an internal site.
Any suggestions/advice/help would be appreciated. I'm not an expert, but also not a complete newbie.
Thanks
9 2001
Put your upload code in a function.
Store your file names in an array.
Loop through that array, calling the upload function at each cyle, until you have processed all array entries.
Ronald :cool:
Thanks once again Ronald!
You are welcome.
Ronald :cool:
Update...
I asked a friend about doing this and he replied:
"its not possible. Its a security measure in
php, and browsers, that they just cant upload any files without you
filling in the input box."
Is this true? If so, it would mean the method above of storing filenames in an array, putting the upload procedure in a function and then calling the function for each file in the array would not work.
Any clarification? Does my friend know what he's talking about?
Well I guess I'll provide clarification. It turns out the automating process cannot be done. In other words, the whole array with filenames, then loop through the array is not possible...for anyone else who wondered...
I am so sorry, but your friend is right!
I was thinking about an FTP upload from an array. And I completely overlooked your statement that you could not use FTP for this.
I am terribly sorry about the confusion I caused you.
Ronald :cool:
No problem at all! I'm just glad to have some closure on it. I've ended up achieving the same thing using a zip class, uploading the zipped file (containing all my files), extracting the file using the class and then deleting the zip file. It works well...
I am glad you found a solution to your problem. Wish I had seen your no-FTP before. Come back here any time.
Ronald :cool:
here is a link that i found useful trying to do the same thing you were trying to do
http://www.it-guru.co.uk/showthread.php?t=923
it is a script to uploading multiple files dunno if it can be modified to do what you want.
eric
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Philippe Lemmerling |
last post by:
I have a question concerning security of my file upload script. I'm using
the php upload routines (move_uploaded_file,...) and variables ($_FILES) to
upload images to a webdirectory. Everything...
|
by: TK |
last post by:
I have a file upload control to allow a user to select/upload a file
to the server. They need to upload x number of files in one shot
because they have to confirm that they are uploading x number...
|
by: Susan |
last post by:
Is it possible to use PHP with VBScript or JavaScript to upload multiple
files.
I'd like to automate the upload of a complete directory (not using FTP).
I don't need a common form with several...
|
by: JFB |
last post by:
Hi All,
It's a way to upload multiple files on a web site using vb.net 2005?
I see the uploadFile tool, but it's only for one file.
Any ideas, examples, links???
Tks in advance
JFB
|
by: Buddy Home |
last post by:
Hello,
I'm trying to upload a file programatically and occasionally I get the
following error message.
Unable to write data to the transport connection: An established connection
was aborted...
|
by: KevinADC |
last post by:
Note: You may skip to the end of the article if all you want is the perl code.
Introduction
Uploading files from a local computer to a remote web server has many useful purposes, the most...
|
by: bonneylake |
last post by:
Hey Everyone,
Well this is my first time asking a question on here so please forgive me if i post
my question in the wrong section.
What i am trying to do is upload multiple files like gmail...
|
by: Kai Apel |
last post by:
Dear Newsgroup,
My name is Kai from Germany and I`m trying to learn VB.Net. My first
Project is a simple Form with a button, witch is starting the
filedialog for multiselect file. All thats...
|
by: AnuSumesh |
last post by:
Hi
We have an application where we can upload file from client machine to any shared device on the network.
Now our requirement is to upload multiple files over the network.
e.g. to path...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
| |