Simple...
Read each file that got saved..
File upload = multi.getFile("manual_file");
if ((upload != null) && (upload.length()>0)){
String newFath = "<your desired path>/" + upload.getName() ;
File dest = new File(path);
upload.renameTo( dest);
}
do the same for each file you uploaded
-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Ravi
Shankar Jagarapu
Sent: 19 July 2001 18:25
To: [EMAIL PROTECTED]
Subject: Multiple File upload in different directories
Hi All,
I have a html form where the user has the ability to
upload multiple files. Depending on what file it is, I
need to store the file in a specific directory.
Like I should store the manual in manual directory and
test document in test directory etc., Also I have
several other parameters which I need to access in the
form apart form the uploaded files.
I have read Jason Hunter's book, and his
MultipartRequest class but it takes only a single
directory as a argument and saves all files in it.
My requirement would be to save each file in a
different directory. Has anyone done this before?
Could you please share with me some pointers or code
samples?
Thanks a lot,
Ravi.
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html