please help me.
Last updated:7/7/2018 3:38:45 AM
please help me.
Use this below code :
public class SimpleFileMove
{
static void Main()
{
string sourceFile = @"C:\Users\Public\public\mindstick.txt";
string destinationFile = @"C:\Users\Public\private\mindstick.txt";
// To move a file or folder to a new location:
System.IO.File.Move(sourceFile, destinationFile);
// To move an entire directory. To programmatically modify or combine
// path strings, use the System.IO.Path class.
System.IO.Directory.Move(@"C:\Users\Public\public\mindstick\", @"C:\Users\Public\private");
}
© Copyright © 2010 - 2021 MindStick Software Pvt. Ltd. All Rights Reserved
Aditya Patel
use following code for deleting file and directory both.