usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.IO;namespacewindowsformsapplication1{ Public Partial classForm1:form { PublicForm1 () {InitializeComponent (); } Private voidButton1_Click (Objectsender, EventArgs e) { stringstrpath = Application.startuppath +"\\"+"Path"+"\\"; if(!directory.exists (strpath)) {directory.createdirectory (strpath); } stringstrFilePath = strpath +"A.xml"; stringstrpathsuccess = Application.startuppath +"\\"+"pathsuccess"+"\\"; if(!directory.exists (strpathsuccess)) {directory.createdirectory (strpathsuccess); } stringstrfilepathsuccess = strpathsuccess +"A.xml"; //File.move (strfilepath,strfilepathsuccess); //textbox1.text= "D:\wenjianjia\a.xml"File.move (strFilePath, @textBox1. Text); MessageBox.Show ("Success"); } }}
[C # Common Code] How to move files in a specified folder to a specified folder