我现在创建了一个图像test.jpg,我想用其他文件名保存它,该怎么办? [英] i have created a image test.jpg now i want to save it with a different filename how can i do?
本文介绍了我现在创建了一个图像test.jpg,我想用其他文件名保存它,该怎么办?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我现在创建了一个图像test.jpg,我想用其他文件名保存它.我该怎么办?
i have created a image test.jpg now i want to save it with a different filename how can i do??
推荐答案
更好的方法是. ..
The better way is to...
System.IO.File.Move(@"C:\From.txt", @"C:\TO.txt");
检查 C#File.Move [ ^ ]进行解释.
你也可以做...
Check C# File.Move[^] for explanations.
You can also do...
File.Copy(oldFileName, NewFileName);
File.Delete(oldFileName);
另一种方法-如何重命名图像 [
Another method - How to rename an image[^].
您可以读取它(二进制选项),然后将其保存到另一个文件名.祝你好运!
You can read it (binary option) and after that you save it to another file name. Good luck!
这篇关于我现在创建了一个图像test.jpg,我想用其他文件名保存它,该怎么办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文