0

path/TempFolderクリックした後、写真がいくつかありAddButtonます。場所を1つずつpath/Images変更し、名前を変更したいのですが、何か考えはありますか?

4

2 に答える 2

1

MS には、これを達成する方法に関するドキュメントがいくつかあります。ここに記載されている解決策を試しましたか?

編集: ここで、将来の子孫のために、SampleMove 関数をサイトからコピーしました。

// Simple synchronous file move operations with no user interface. 
public class SimpleFileMove
{
    static void Main()
    {
        string sourceFile = @"C:\Users\Public\public\test.txt";
        string destinationFile = @"C:\Users\Public\private\test.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\test\", @"C:\Users\Public\private");
    }
}
于 2013-08-24T12:00:53.200 に答える