Rename the images name (tiff, JPEG etc...) using C sharp

Posted by Agopi.net under C# on 1/12/2012 | Points: 10 | Views : 2262 | Status : [Member] | Replies : 1
I want to rename the multiple images which is available in the multiple folder. I need the two types of renaming the images. For example each folder having the 100 images with the starting tiff name is abc001.tif, abc002.tif....

Below is the two type of image rename options.

1) Here i need to rename the tif's by using zxy001.tif, zxy002.tif....
2) By read the tiff name in notepad and the compare to actual images names then i need to rename.

Could anyone give me the idea of program on this.




Responses

Posted by: Jpchoudhari on: 1/12/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,

C# doesn't provide rename facility directly. But you can use either of these two methods.

1)
File.Copy(OldFileName, NewFileName);
File.Delete(OldFileName);
2)
File.Move(OldFileName,NewFileName);

Kind Regards,
Jay

Agopi.net, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response