如何重命名imae文件 [英] how to rename imae file

查看:71
本文介绍了如何重命名imae文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,
请任何人帮助我如何重命名图像文件..

1.图像文件名为1.jpg
2.我想根据在文本框中输入的值对其进行重命名.

hi friends,
Please anyone help me how to rename the image file..

1. The image file name is 1.jpg
2. I want to rename it according to the value entered in the textbox.

str = images[currIndex].Name.ToString();
           string name = txt_imagename.Text;
           File.Copy(str, name, true);



我尝试了上面的代码不起作用.

错误:
找不到文件"1.JPG".

请帮助我



I tried the above code its not working.

Error:
Could not find file ''1.JPG''.

please help me

推荐答案

请参阅我对问题的评论.您需要两件事:
http://www.dotnetperls.com/file-move [ Microsoft Q209354 .

祝你好运,
—SA
Please see my comments to the question. You need two things:
http://www.dotnetperls.com/file-move[^],
Microsoft Q209354.

Good luck,
—SA


这篇关于如何重命名imae文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆