public static void CutFile(string file) { FileSystemInfo fsinfo = null; if (File.Exists(file)) { fsinfo = new FileInfo(file); } else if (Directory.Exists(file)) { fsinfo = new DirectoryInfo(file); } ClipboardUtils.PutFilesOnClipboard( new List <FileSystemInfo> { fsinfo }, DragDropEffects.Move); }
public static void CutFiles(IEnumerable <string> filesAndFolders) { ClipboardUtils.PutFilesOnClipboard( ClipboardUtils.GetFileSystemInfoList(filesAndFolders), DragDropEffects.Move); }