Xcopy 記憶體不足問題處理 (使用 Robocopy )



Robocopy是用於文件複製一個32位的命令行工具。此工具可幫助保持目錄結構的電腦上或在不同的網絡位置相同的副本。Robocopy 是包含在Microsoft®Windows®的資源工具包或是 Windows 7 以後的系統。


  •  Vista 以後的作業系統 (含 Windows 7/8 ),不須靠外來任何工具程式,XP,2000,2003可由Windows Server 2003 時出的 ResourceKit之Tools。
  • 如果系統是 XP,2000,2003 請到 Microsoft官網下載 ResourceKit ,直按安裝安裝程式會自動將 ResourceKit 的資料夾加入Path 環境變數可以馬上使用,或是將該檔案複製到批次執行目錄區,或是 System32 目錄。.
  • 使用 copy 或是 Xcopy 指令的方式來作檔案的拷貝,有比較特殊的檔名或太多層的資料夾深度,比較容易失敗。
  • Robocopy 除了是個資料夾/檔案的複製指令外,另外提供同步、差異化備份的需求。.
指令範例 : 差異化備份
robocopy "E:\data\Frances"  J:\Backup\E-Driver\data\Frances\ /e /xo /xa:sh /xj /eta /R:3 /XD RECYCLER 
參數說明:
/E 
Copies all sub-directories (including empty ones). (包含子目錄)
/XO 
Excludes files tagged as “Older”.. (排除較舊的檔案)
/XA:{R|A|S|H|C|N|E|T|O} 
Excludes files with the specified attributes. (排除指定的參數檔案)
The following file attributes can be acted upon:
R – Read only    A – Archive            S – System 
H – Hidden         C – Compressed    N – Not content indexed
E – Encrypted    T – Temporary       O - Offline
/XJ
Excludes Junction points. 
/ETA 
Shows estimated time of completion for copied files. (顯示預估完成的時間 )
/R:n
Specifies the number of retries on failed copies. (The default is 1 million.) (錯誤重覆嘗試次數)
/XD dir [dir]
Excludes directories with the specified names, paths, or wildcard characters. (排除指定的目錄)

arrow
arrow
    全站熱搜

    nan 發表在 痞客邦 留言(1) 人氣()