473,387 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

uploading multiple file in a folder

hi group,

i need to upload all jpg images located in a folder is it possible
using file option

thanks in advance

karnati

Jun 22 '06 #1
7 1543
No. You either need to provide multiple input file fields, or have the user
zip it up, send you the zip and unzip it.

This is an HTML limitation.

Karl

--
http://www.openmymind.net/

"karnati" <sw***********@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
hi group,

i need to upload all jpg images located in a folder is it possible
using file option

thanks in advance

karnati

Jun 22 '06 #2
hi karl,

thanks for ur reply
i am trying to upload contents of a full folder using

private const string SERVER_FOLDER = @"C:\ServerFolder\";

private void Button1_Click(object sender, System.EventArgs e)
{
ArrayList fileList = new ArrayList();
string dirNameWithPath =
System.IO.Path.GetDirectoryName(File1.PostedFile.F ileName);
// Get the files in the Directory
string[] files = Directory.GetFiles(dirNameWithPath);
foreach(string str in files)
{
// Add into the ArrayList
fileList.Add(System.IO.Path.GetFileName(str));
}
// Bind to the ListBox
ListBox1.DataSource = fileList;
ListBox1.DataBind();
// Run a loop and upload the files
foreach(string str in fileList)
{
File1.PostedFile.SaveAs(SERVER_FOLDER+System.IO.Pa th.GetFileName(str));
}
}

in my native system it is working fine but when i setup and try to
upload it is not returning the directorypath name

so please help me with that
thanks in advance
karnati


Karl Seguin [MVP] wrote:
No. You either need to provide multiple input file fields, or have the user
zip it up, send you the zip and unzip it.

This is an HTML limitation.

Karl

--
http://www.openmymind.net/
news:11**********************@i40g2000cwc.googlegr oups.com...
hi group,

i need to upload all jpg images located in a folder is it possible
using file option

thanks in advance

karnati


Jun 26 '06 #3
Your code doesn't make any sense to me. You are getting all the files in a
folder on the server, and then using the fileUpload control to save the same
file over and over again?

if c:\serverfolder\ contains:

sample.txt
song.mp3
test.ini
and the user uploads "Friend.Jpg", your code will save "Friend.Jpg" as
"sample.txt", "song.mp3" and "test.ini" which I can't imagine why you'd
want to do that..

Karl

--
http://www.openmymind.net/

"karnati" <sw***********@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
hi karl,

thanks for ur reply
i am trying to upload contents of a full folder using

private const string SERVER_FOLDER = @"C:\ServerFolder\";

private void Button1_Click(object sender, System.EventArgs e)
{
ArrayList fileList = new ArrayList();
string dirNameWithPath =
System.IO.Path.GetDirectoryName(File1.PostedFile.F ileName);
// Get the files in the Directory
string[] files = Directory.GetFiles(dirNameWithPath);
foreach(string str in files)
{
// Add into the ArrayList
fileList.Add(System.IO.Path.GetFileName(str));
}
// Bind to the ListBox
ListBox1.DataSource = fileList;
ListBox1.DataBind();
// Run a loop and upload the files
foreach(string str in fileList)
{
File1.PostedFile.SaveAs(SERVER_FOLDER+System.IO.Pa th.GetFileName(str));
}
}

in my native system it is working fine but when i setup and try to
upload it is not returning the directorypath name

so please help me with that
thanks in advance
karnati


Karl Seguin [MVP] wrote:
No. You either need to provide multiple input file fields, or have the
user
zip it up, send you the zip and unzip it.

This is an HTML limitation.

Karl

--
http://www.openmymind.net/

news:11**********************@i40g2000cwc.googlegr oups.com...
> hi group,
>
> i need to upload all jpg images located in a folder is it possible
> using file option
>
> thanks in advance
>
> karnati
>

Jun 26 '06 #4
hi karl

thanks for that reply, i got one more problem

is it possible to access the .mdb file from client system

i.e when client says browse and selects the mdb file the data in it
should be accessd

is it possible
have a nice day

karnati

Jun 28 '06 #5
Sure, you'll need to store the file on the server and open it though - just
like you would any other mdb file sitting on the server.

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"karnati" <sw***********@gmail.com> wrote in message
news:11*********************@y41g2000cwy.googlegro ups.com...
hi karl

thanks for that reply, i got one more problem

is it possible to access the .mdb file from client system

i.e when client says browse and selects the mdb file the data in it
should be accessd

is it possible
have a nice day

karnati

Jun 28 '06 #6

Karl Seguin [MVP] wrote:
Sure, you'll need to store the file on the server and open it though -
just like you would any other mdb file sitting on the server.

Karl

hi karl
thanks for that reply
but my requirement is without uploading to website direct access from
client system
is it possible
have a nice day
karnati

Jun 29 '06 #7
No. You can't connect to an access database remotely -the Jet engine simply
doesn't support that.

Karl
--
http://www.openmymind.net/

"karnati" <sw***********@gmail.com> wrote in message
news:11**********************@y41g2000cwy.googlegr oups.com...

Karl Seguin [MVP] wrote:
Sure, you'll need to store the file on the server and open it though -
just like you would any other mdb file sitting on the server.

Karl

hi karl
thanks for that reply
but my requirement is without uploading to website direct access from
client system
is it possible
have a nice day
karnati

Jun 29 '06 #8

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

Similar topics

5
by: Ron Brennan | last post by:
Good afternoon. The entire task that I'm trying to achieve is to allow a user to browse and upload multiple files simultaneously, hiding the Browse button of <input> tags of type="file" and...
3
by: darrel | last post by:
I've built a file upload tool that allows a person to upload an image file and then have it be resized and then saved on the server. I'd like to allow a person to also upload an entire folder of...
13
by: Sky Sigal | last post by:
I have created an IHttpHandler that waits for uploads as attachments for a webmail interface, and saves it to a directory that is defined in config.xml. My question is the following: assuming...
4
by: Ramakrishnan Nagarajan | last post by:
Hi, I am facing a different problem in my application. In that I am uploading a folder that contain only images. Everything was done and was working fine too. When I executed the application using...
0
by: lknight643 | last post by:
I have an asp.net application that works with a SQL server database on server No. 1 but I want to upload files for storage to Server No. 2 that is accessible only from the Internet. If the file...
5
by: Chris | last post by:
I have a meetings section I'm developing on our intranet. Using PHP/MySQL. Meeting info and Meeting docs reside on 2 related tables in the db. Users may want to upload anywhere from 1 to 10 or...
1
by: arunbalait | last post by:
Hi I created asp script for uploading multiple files, But now I want to upload entire folder instead uploading files one by one... Plz give me some ideas... Thank you............
14
w33nie
by: w33nie | last post by:
What I'm trying to do here, is upload a video to the ../video/ folder, and up to 5 images to the ../images/ folder. As well as the database information like title, content and each file's file...
2
by: Zoliq | last post by:
Hi, I have a serious problem. I'm currently developing an application in which the user should upload many files (600-700 xml files). I've searched the web for a while and so far I realized that...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...

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.