1 创建文件夹
Directory.CreateDirectory("C:\\sravan");
2复制文件
System.IO.File.Copy(sourcePath, targetPath, true);
3获取文件名
item3==@"c:\temp\test003.txt";
string str1 = System.IO.Path.GetFileName(item3);//test003.txt
该博客主要围绕C#开发语言展开,介绍了利用C#进行开发的相关操作,包括创建文件夹、复制文件以及获取文件名等信息技术相关内容。
1 创建文件夹
Directory.CreateDirectory("C:\\sravan");
2复制文件
System.IO.File.Copy(sourcePath, targetPath, true);
3获取文件名
item3==@"c:\temp\test003.txt";
string str1 = System.IO.Path.GetFileName(item3);//test003.txt

被折叠的 条评论
为什么被折叠?