var filePath = new FileInfo(@"c:\text(sdf\123).txt"); Console.WriteLine(filePath.Name); Console.WriteLine(filePath.FullName);代码...
分类:
其他好文 时间:
2014-06-21 06:48:38
阅读次数:
236
一、输出,把过滤器过滤出的内容输出到输出设备或者文件,包含>,>>1、其中>为重新输出,没错输出都会清空输出设备或者文件内容,如果输出错误信息用2> ,如果普通信息和错误信息都输出用&> or 2>&1如 cat filepath > /tmp/tmpinfo 2>&1 cat filepath &...
分类:
其他好文 时间:
2014-06-19 00:22:59
阅读次数:
300
public class Weather { static readonly string FilePath = System.Environment.CurrentDirectory + @"\Area.txt"; public static Models.Are...
分类:
Web程序 时间:
2014-06-18 19:31:48
阅读次数:
140
//上传文件实例if (fileDealer.HasFile)//判断文件是否存在 { string filepath = ""; try { string path = fileDealer.FileName; string filename = path.Split('.')[0] + "_"....
分类:
Web程序 时间:
2014-06-18 15:52:21
阅读次数:
275
System.Diagnostics.Process.Start的妙用:文件夹打开时自动选中一个文件,比如自动选中此目录下的指定文件方法:Process.Start("Explorer","/select,"+filePath);我们经常会遇到在Winform或是WPF中点击链接或按钮打开某个指定的...
分类:
其他好文 时间:
2014-06-16 13:23:08
阅读次数:
337
if (Request["name"] != null) { try { string FileName = MyCrypt.Decrypt(Request["name"]); //string FilePath = Server.MapPath(string.Format("UploadFile....
分类:
其他好文 时间:
2014-06-14 23:47:24
阅读次数:
352
使用Image.FromFile取磁盘上的图片时,这个方法会锁定图片文件,而且会导致内存占用增大,
有几种方法解决:一:将Image类转换成Bitmap类System.Drawing.Image img =
System.Drawing.Image.FromFile(filepath);Syste....
分类:
其他好文 时间:
2014-06-12 22:42:28
阅读次数:
289
//读取报告数据
string data=null;
using (System.IO.StreamReader sr = new System.IO.StreamReader(filePath, System.Text.Encoding.Default))
{
...
分类:
其他好文 时间:
2014-06-08 08:27:59
阅读次数:
236
1 /// 2 /// 下载文件 TransmitFile 3 /// 4 /// 5 public
static void DownloadFile(string filePath) 6 { 7...
分类:
Web程序 时间:
2014-06-07 07:59:55
阅读次数:
311
1 /// 2 /// 浏览文件 3 /// 4 /// 5 public static void
ExploreFile(string filePath) 6 { 7 P...
分类:
其他好文 时间:
2014-06-07 07:55:26
阅读次数:
252