Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • 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 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...

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