示例#1
0
        private void SHCopyFiles(string[] sourceFiles, string destinationFolder)
        {
            ShellFileOperation fo = new ShellFileOperation();
            List <string>      destinationFiles = new List <string>();

            foreach (string sourceFile in sourceFiles)
            {
                destinationFiles.Add(Path.Combine(destinationFolder, Path.GetFileName(sourceFile)));
            }

            fo.InvokeOperation(this.Handle, FileOperations.Copy, sourceFiles, destinationFiles.ToArray());
        }
示例#2
0
        private void SHCopyFiles(string[] sourceFiles, string destinationFolder)
        {
            ShellFileOperation fo = new ShellFileOperation();
            List<string> destinationFiles = new List<string>();

            foreach (string sourceFile in sourceFiles)
            {
                destinationFiles.Add(Path.Combine(destinationFolder, Path.GetFileName(sourceFile)));
            }

            fo.InvokeOperation(this.Handle, FileOperations.Copy, sourceFiles, destinationFiles.ToArray());
        }
示例#3
0
        private void SHCopyFiles(string[] sourceFiles, string destinationFolder)
        {
            ShellFileOperation fo = new ShellFileOperation();

            fo.InvokeOperation(this.Handle, FileOperations.Copy, sourceFiles, sourceFiles.Select(sourceFile => Path.Combine(destinationFolder, Path.GetFileName(sourceFile))).ToArray());
        }
示例#4
0
        private void SHCopyFiles(string[] sourceFiles, string destinationFolder)
        {
            ShellFileOperation fo = new ShellFileOperation();

            fo.InvokeOperation(this.Handle, FileOperations.Copy, sourceFiles, sourceFiles.Select(sourceFile => Path.Combine(destinationFolder, Path.GetFileName(sourceFile))).ToArray());
        }