如何把找到的.txt文件批量移动到电脑中

解决方案 »

  1.   

    ??你的txt文件就不在电脑中了?,都在电脑中,怎么移动?
      

  2.   

    就是找到.txt文件,点击按钮导出。跳出相当于另存为的框框。然后可以选任何一个文件夹,把文件移动到那个文件夹中
      

  3.   

    File ..::.Move 方法 
    将指定文件移到新位置,并提供指定新文件名的选项
    using System;
    using System.IO;class Test 
    {
        public static void Main() 
        {
            string path = @"c:\temp\MyTest.txt";
            string path2 = @"c:\temp2\MyTest.txt";
            try 
            {
                if (!File.Exists(path)) 
                {
                    // This statement ensures that the file is created,
                    // but the handle is not kept.
                    using (FileStream fs = File.Create(path)) {}
                }            // Ensure that the target does not exist.
                if (File.Exists(path2))    
                File.Delete(path2);            // Move the file.
                File.Move(path, path2);
                Console.WriteLine("{0} was moved to {1}.", path, path2);            // See if the original exists now.
                if (File.Exists(path)) 
                {
                    Console.WriteLine("The original file still exists, which is unexpected.");
                } 
                else 
                {
                    Console.WriteLine("The original file no longer exists, which is expected.");
                }                    } 
            catch (Exception e) 
            {
                Console.WriteLine("The process failed: {0}", e.ToString());
            }
        }
    }
      

  4.   

     string[] files = Directory.GetFiles(Path,"*.txt");
                int i=0;
                foreach(string file in files)
                {
                    File.Move(file,newfilepath+(i++).ToString());
                }
      

  5.   

    string[] files = Directory.GetFiles(Path,"*.txt");
                int i=0;
                foreach(string file in files)
                {
                    File.Move(file,newfilepath+(i++).ToString());
                }