Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Rename The File

 
naval kumar
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Sir,
I have To rename the File 123.pdf with The 123_userId.pdf.

I have seen the code



But I want To Rename the File With the Existing Name+"-"+DynamicUserID.pdf ( Example 123.pdf with 123_5122.pdf)
 
Stuart A. Burkett
Ranch Hand
Posts: 679
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
naval kumar wrote:But I want To Rename the File With the Existing Name+"-"+DynamicUserID.pdf ( Example 123.pdf with 123_5122.pdf)

So what problems are you having ? You will find suitable methods for doing what you want in the File and String classes.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic