• Post Reply Bookmark Topic Watch Topic
  • New Topic

renaming file..  RSS feed

 
sreenivas jeenor
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am using Oriely Servlet to upload a image..how Should i rename the Saved file


String realpath = scContext.getRealPath("images\\PatientImages\\");
String newdir =realpath;

boolean success =(new File(newdir)).mkdirs();
MultipartRequest mpreq = new MultipartRequest(request,newdir);

String fileName = mpreq.getOriginalFileName("filepath");

fileName is returning the image name stored.for eg "pic1234.jpg"

how should i rename from from "pic1234.jpg" to "vasu.jpg"

help me...

Thanks
[ August 28, 2007: Message edited by: sreenivas jeenor ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!