Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# move files from one directory to another

using System.IO;

string rootDirectory = @"C:UsersUSERFolder1";
string destinationDirectory = @"C:UsersUSERFolder2";

string[] Files = Directory.GetFiles(rootDirectory);

foreach (string file in Files) {
	File.Move(file, $"{destinationDirectory}{Path.GetFileName(file)}");
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #move #files #directory
ADD COMMENT
Topic
Name
3+3 =