Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

renaming file..

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