Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

move file c#

// Move the file.
//File.Move(from,to)
File.Move(@"c:	empMyTest.txt", @"c:	emp2MyTest.txt");
Comment

move file c#


for (int i = 1; i < n; i++)
{
    try
    {
        from = System.IO.Path.Combine(@"E:vid","(" + i.ToString() + ").PNG");
        to = System.IO.Path.Combine(@"E:ConvertedFiles",i.ToString().PadLeft(6,'0') + ".png");

        File.Move(from, to); // Try to move
        Console.WriteLine("Moved"); // Success
    }
    catch (IOException ex)
    {
        Console.WriteLine(ex); // Write error
    }
}

Comment

PREVIOUS NEXT
Code Example
Csharp :: how to make rb.addforce 2d 
Csharp :: c# empty char 
Csharp :: headless chromedriver C# 
Csharp :: shaking camera in c# 
Csharp :: asp.net core 3.1: cast jObject to dictionary<string,string 
Csharp :: get filename from path c# 
Csharp :: get values from range entity framework 
Csharp :: set textbox colour to transparent c# 
Csharp :: oncollisionenter unity 
Csharp :: message box in visual studio 
Csharp :: unity gameobject.findobjectswith tag set active 
Csharp :: c# get file extension 
Csharp :: q# hello world 
Csharp :: disable script in unity 
Csharp :: hide game obj oncollisionenter 
Csharp :: Directory Entry c# get computer list 
Csharp :: convert bytes to string and back c# 
Csharp :: how to do if comands in c# 
Csharp :: c# convert utc to est 
Csharp :: remove whitespace between string c# 
Csharp :: c # c^b 
Csharp :: asp textarea 
Csharp :: c# byte array to string 
Csharp :: SIMPLE HTTP REQUEST C# 
Csharp :: how to remove last 3 characters from string in c# 
Csharp :: c# convert list to string 
Csharp :: convert int to uint c# 
Csharp :: c# enum check in string value 
Csharp :: bubble sort in c# 
Csharp :: ef core detach entity 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =