コード例 #1
0
ファイル: _FileFolderExt.cs プロジェクト: yongzhi444/sharpAHK
        /// <summary>Moves a folder along with all its sub-folders and files. It can also rename a folder. (Same as FileMoveDir)</summary>
        /// <param name="Source">Name of the source directory (with no trailing backslash), which is assumed to be in %A_WorkingDir% if an absolute path isn't specified.</param>
        /// <param name="Dest">The new path and name of the directory (with no trailing baskslash), which is assumed to be in %A_WorkingDir% if an absolute path isn't specified. For example: D:\My Folder. Note: Dest is the actual path and name that the directory will have after it is moved; it is not the directory into which Source is moved (except for the known limitation mentioned below).</param>
        /// <param name="Flag">0 (default): Do not overwrite existing files. | 1: Overwrite existing files. However, any files or subfolders inside Dest that do not have a counterpart in Source will not be deleted. | 2: The same as mode 1 above except that the limitation is absent. | R: Rename the directory rather than moving it. </param>
        public static bool MoveDir(this string Source, string Dest, string Flag = "0")
        {
            _AHK ahk = new _AHK();

            return(ahk.FileMoveDir(Source, Dest, Flag));
        }