Robocopy » 履歴 » バージョン 3
sylow castle, 2019/04/23 10:47
| 1 | 1 | sylow castle | # Robocopy |
|---|---|---|---|
| 2 | |||
| 3 | 頑張ってrobocopyの使い方を翻訳する |
||
| 4 | |||
| 5 | |||
| 6 | |||
| 7 | ## 訳 |
||
| 8 | |||
| 9 | ### その1 |
||
| 10 | |||
| 11 | ``` |
||
| 12 | ------------------------------------------------------------------------------- |
||
| 13 | ROBOCOPY :: Windows向けの堅牢なファイルコピー |
||
| 14 | ------------------------------------------------------------------------------- |
||
| 15 | |||
| 16 | 開始 : 2019年4月21日 21:49:46 |
||
| 17 | コピー元 - |
||
| 18 | コピー先 - |
||
| 19 | |||
| 20 | ファイル : |
||
| 21 | オプション : /DCOPY:DA /COPY:DAT /R:1000000 /W:30 |
||
| 22 | |||
| 23 | ------------------------------------------------------------------------------ |
||
| 24 | |||
| 25 | エラー : 無効な引数 #1 : "/help" |
||
| 26 | |||
| 27 | 簡単な使い方 :: ROBOCOPY <コピー元> <コピー先> /MIR |
||
| 28 | |||
| 29 | <コピー元> :: コピー元ディレクトリ (ドライブ文字:\パス または \\サーバー\共有フォルダ\パス). |
||
| 30 | <コピー先> :: コピー先ディレクトリ (ドライブ文字:\パス または \\サーバー\共有フォルダ\パス). |
||
| 31 | /MIR :: ディレクトリツリーを忠実に復元します(原語:Mirror). |
||
| 32 | |||
| 33 | これ以上の使い方の情報が欲しいとき ROBOCOPY /? |
||
| 34 | |||
| 35 | |||
| 36 | **** /MIR はコピーするのと同じように「削除も」します |
||
| 37 | ``` |
||
| 38 | |||
| 39 | ### その2 |
||
| 40 | |||
| 41 | ``` |
||
| 42 | |||
| 43 | 2 | sylow castle | :: |
| 44 | :: コピー オプション : |
||
| 45 | :: |
||
| 46 | /S :: サブディレクトリをコピーします。ただし、空ディレクトリは含みません。 |
||
| 47 | /E :: サブディレクトリをコピーします。空ディレクトリも含みます。 |
||
| 48 | /LEV:n :: コピー元ディレクトリツリーから上位n階層(原語:n LEVles)のみコピーします。 |
||
| 49 | 1 | sylow castle | |
| 50 | 2 | sylow castle | /Z :: 再開モードでファイルをコピーします。copy files in restartable mode. |
| 51 | /B :: バックアップモードでファイルをコピーします. |
||
| 52 | /ZB :: 再開モードを使用します。アクセスできないときバックアップモードを使用します。 |
||
| 53 | /J :: バッファ無しI/Oを使用してコピーします(大きいファイルにおススメです) |
||
| 54 | /EFSRAW :: 暗号化ファイルをEFS RAWモードでコピーします。 |
||
| 55 | |||
| 56 | /COPY:コピーフラグ[s] :: 何をコピーするか指定します (初期値 /COPY:DAT). |
||
| 57 | (コピーフラグ : D=データ, A=属性(原語:Attributes), T=タイムスタンプ). |
||
| 58 | (S=Security=NTFS ACL, O=所有者情報, U=監査情報). |
||
| 59 | |||
| 60 | |||
| 61 | /SEC :: セキュリティ情報もコピーします (/COPY:DATSと等価です). |
||
| 62 | /COPYALL :: 全ての情報をコピーします (/COPY:DATSOUと等価です). |
||
| 63 | /NOCOPY :: ファイル情報をコピーしません。 (/PURGEとの併用が便利です). |
||
| 64 | /SECFIX :: FIX file SECurity on all files, even skipped files. |
||
| 65 | /TIMFIX :: FIX file TIMes on all files, even skipped files. |
||
| 66 | |||
| 67 | /PURGE :: コピー元に存在しないファイル/ディレクトリをコピー先から削除します。 |
||
| 68 | /MIR :: ディレクトリツリーを忠実に複製(原語:MIRror)します (これは/Eと/PURGEの指定に等価です。) |
||
| 69 | |||
| 70 | /MOV :: ファイルを移動します(コピー後に、コピー元から削除されます)。 |
||
| 71 | /MOVE :: ファイルとディレクトリを移動します (コピー後に、コピー元から削除されます). |
||
| 72 | |||
| 73 | 3 | sylow castle | /A+:[RASHCNET] :: コピーされたファイルに属性を追加します。 |
| 74 | /A-:[RASHCNET] :: コピーされたファイルから属性を削除します。 |
||
| 75 | 2 | sylow castle | |
| 76 | 3 | sylow castle | /CREATE :: ディレクトリツリーとサイズ0のファイルのみ作成します。 |
| 77 | /FAT :: 8.3FATファイル名でファイルを作成します。 |
||
| 78 | /256 :: 長いファイルパス(256文字より多い)のサポートをオフにします。 |
||
| 79 | 2 | sylow castle | |
| 80 | 3 | sylow castle | /MON:n :: コピー元を監視します。n個以上の変化があったとき再び実行します。 |
| 81 | /MOT:m :: コピー元を監視します。m分後、変更があれば再び実行します。 |
||
| 82 | 2 | sylow castle | |
| 83 | /RH:hhmm-hhmm :: Run Hours - times when new copies may be started. |
||
| 84 | /PF :: check run hours on a Per File (not per pass) basis. |
||
| 85 | 1 | sylow castle | |
| 86 | 3 | sylow castle | /IPG:n :: パケット間遅延(ms)、回線を絞るため、あるいは低速回線のためにあります。 |
| 87 | 1 | sylow castle | |
| 88 | /SL :: copy symbolic links versus the target. |
||
| 89 | |||
| 90 | 3 | sylow castle | /MT[:n] :: マルチスレッドを使用します。nスレッドでコピーします。(初期値 8). |
| 91 | nは1以上128以下でなければなりません。 |
||
| 92 | このオプションは/IPGや/EFSRAWを両立しません。 |
||
| 93 | パフォーマンスを向上させるために、/LOGオプションを使用し出力をリダイレクトしてください。 |
||
| 94 | 1 | sylow castle | |
| 95 | 3 | sylow castle | /DCOPY:copyflag[s] :: ディレクトリに対して何をコピーするか指定します(初期値は/DCOPY:DA). |
| 96 | (コピーフラグ : D=データ, A=属性, T=タイムスタンプ). |
||
| 97 | 1 | sylow castle | |
| 98 | 3 | sylow castle | /NODCOPY :: ディレクトリ情報をコピーしません。 (初期値は/DCOPY:DA). |
| 99 | 1 | sylow castle | |
| 100 | 3 | sylow castle | /NOOFFLOAD :: Windowsコピーオフロード機構を使用せずにファイルをコピーします。 |
| 101 | |||
| 102 | :: |
||
| 103 | :: File Selection Options : |
||
| 104 | :: |
||
| 105 | /A :: copy only files with the Archive attribute set. |
||
| 106 | /M :: copy only files with the Archive attribute and reset it. |
||
| 107 | /IA:[RASHCNETO] :: Include only files with any of the given Attributes set. |
||
| 108 | /XA:[RASHCNETO] :: eXclude files with any of the given Attributes set. |
||
| 109 | |||
| 110 | /XF file [file]... :: eXclude Files matching given names/paths/wildcards. |
||
| 111 | /XD dirs [dirs]... :: eXclude Directories matching given names/paths. |
||
| 112 | |||
| 113 | /XC :: eXclude Changed files. |
||
| 114 | /XN :: eXclude Newer files. |
||
| 115 | /XO :: eXclude Older files. |
||
| 116 | /XX :: eXclude eXtra files and directories. |
||
| 117 | /XL :: eXclude Lonely files and directories. |
||
| 118 | /IS :: Include Same files. |
||
| 119 | /IT :: Include Tweaked files. |
||
| 120 | |||
| 121 | /MAX:n :: MAXimum file size - exclude files bigger than n bytes. |
||
| 122 | /MIN:n :: MINimum file size - exclude files smaller than n bytes. |
||
| 123 | |||
| 124 | /MAXAGE:n :: MAXimum file AGE - exclude files older than n days/date. |
||
| 125 | /MINAGE:n :: MINimum file AGE - exclude files newer than n days/date. |
||
| 126 | /MAXLAD:n :: MAXimum Last Access Date - exclude files unused since n. |
||
| 127 | /MINLAD:n :: MINimum Last Access Date - exclude files used since n. |
||
| 128 | (If n < 1900 then n = n days, else n = YYYYMMDD date). |
||
| 129 | |||
| 130 | /XJ :: eXclude Junction points and symbolic links. (normally included by default). |
||
| 131 | |||
| 132 | /FFT :: assume FAT File Times (2-second granularity). |
||
| 133 | /DST :: compensate for one-hour DST time differences. |
||
| 134 | |||
| 135 | /XJD :: eXclude Junction points and symbolic links for Directories. |
||
| 136 | /XJF :: eXclude symbolic links for Files. |
||
| 137 | |||
| 138 | |||
| 139 | :: |
||
| 140 | :: Retry Options : |
||
| 141 | :: |
||
| 142 | /R:n :: コピー失敗時のリトライ回数です。初期値100万回です。number of Retries on failed copies: default 1 million. |
||
| 143 | /W:n :: リトライ待機時間です。初期値は30秒です。 |
||
| 144 | |||
| 145 | /REG :: 初期値として/R:nと/W:nをレジストリに保存する |
||
| 146 | |||
| 147 | /TBD :: wait for sharenames To Be Defined (retry error 67). |
||
| 148 | 1 | sylow castle | ``` |
| 149 | 2 | sylow castle | |
| 150 | ### メモ |
||
| 151 | |||
| 152 | * 再開モード |
||
| 153 | ちょっとずつ、部分的にファイルをコピーしていくらしい。途中で失敗したら途中から再開するらしい。 |
||
| 154 | 大きなファイルとかコピーするときに使うといいってさ。 |
||
| 155 | https://stackoverflow.com/questions/20982968/what-is-robocopys-restartable-option |
||
| 156 | 1 | sylow castle | |
| 157 | |||
| 158 | ## 元の文 |
||
| 159 | |||
| 160 | ### その1 |
||
| 161 | |||
| 162 | ``` |
||
| 163 | robocopy /help |
||
| 164 | |||
| 165 | ------------------------------------------------------------------------------- |
||
| 166 | ROBOCOPY :: Robust File Copy for Windows |
||
| 167 | ------------------------------------------------------------------------------- |
||
| 168 | |||
| 169 | Started : 2019年4月21日 21:49:46 |
||
| 170 | Source - |
||
| 171 | Dest - |
||
| 172 | |||
| 173 | Files : |
||
| 174 | Options : /DCOPY:DA /COPY:DAT /R:1000000 /W:30 |
||
| 175 | |||
| 176 | ------------------------------------------------------------------------------ |
||
| 177 | |||
| 178 | ERROR : Invalid Parameter #1 : "/help" |
||
| 179 | |||
| 180 | Simple Usage :: ROBOCOPY source destination /MIR |
||
| 181 | |||
| 182 | source :: Source Directory (drive:\path or \\server\share\path). |
||
| 183 | destination :: Destination Dir (drive:\path or \\server\share\path). |
||
| 184 | /MIR :: Mirror a complete directory tree. |
||
| 185 | |||
| 186 | For more usage information run ROBOCOPY /? |
||
| 187 | |||
| 188 | |||
| 189 | **** /MIR can DELETE files as well as copy them ! |
||
| 190 | ``` |
||
| 191 | |||
| 192 | ### その2 |
||
| 193 | |||
| 194 | ``` |
||
| 195 | robocopy /? |
||
| 196 | |||
| 197 | ------------------------------------------------------------------------------- |
||
| 198 | ROBOCOPY :: Robust File Copy for Windows |
||
| 199 | ------------------------------------------------------------------------------- |
||
| 200 | |||
| 201 | Started : 2019年4月21日 21:50:27 |
||
| 202 | Usage :: ROBOCOPY source destination [file [file]...] [options] |
||
| 203 | |||
| 204 | source :: Source Directory (drive:\path or \\server\share\path). |
||
| 205 | destination :: Destination Dir (drive:\path or \\server\share\path). |
||
| 206 | file :: File(s) to copy (names/wildcards: default is "*.*"). |
||
| 207 | |||
| 208 | :: |
||
| 209 | :: Copy options : |
||
| 210 | :: |
||
| 211 | /S :: copy Subdirectories, but not empty ones. |
||
| 212 | /E :: copy subdirectories, including Empty ones. |
||
| 213 | /LEV:n :: only copy the top n LEVels of the source directory tree. |
||
| 214 | |||
| 215 | /Z :: copy files in restartable mode. |
||
| 216 | /B :: copy files in Backup mode. |
||
| 217 | /ZB :: use restartable mode; if access denied use Backup mode. |
||
| 218 | /J :: copy using unbuffered I/O (recommended for large files). |
||
| 219 | /EFSRAW :: copy all encrypted files in EFS RAW mode. |
||
| 220 | |||
| 221 | /COPY:copyflag[s] :: what to COPY for files (default is /COPY:DAT). |
||
| 222 | (copyflags : D=Data, A=Attributes, T=Timestamps). |
||
| 223 | (S=Security=NTFS ACLs, O=Owner info, U=aUditing info). |
||
| 224 | |||
| 225 | |||
| 226 | /SEC :: copy files with SECurity (equivalent to /COPY:DATS). |
||
| 227 | /COPYALL :: COPY ALL file info (equivalent to /COPY:DATSOU). |
||
| 228 | /NOCOPY :: COPY NO file info (useful with /PURGE). |
||
| 229 | /SECFIX :: FIX file SECurity on all files, even skipped files. |
||
| 230 | /TIMFIX :: FIX file TIMes on all files, even skipped files. |
||
| 231 | |||
| 232 | /PURGE :: delete dest files/dirs that no longer exist in source. |
||
| 233 | /MIR :: MIRror a directory tree (equivalent to /E plus /PURGE). |
||
| 234 | |||
| 235 | /MOV :: MOVe files (delete from source after copying). |
||
| 236 | /MOVE :: MOVE files AND dirs (delete from source after copying). |
||
| 237 | |||
| 238 | /A+:[RASHCNET] :: add the given Attributes to copied files. |
||
| 239 | /A-:[RASHCNET] :: remove the given Attributes from copied files. |
||
| 240 | |||
| 241 | /CREATE :: CREATE directory tree and zero-length files only. |
||
| 242 | /FAT :: create destination files using 8.3 FAT file names only. |
||
| 243 | /256 :: turn off very long path (> 256 characters) support. |
||
| 244 | |||
| 245 | /MON:n :: MONitor source; run again when more than n changes seen. |
||
| 246 | /MOT:m :: MOnitor source; run again in m minutes Time, if changed. |
||
| 247 | |||
| 248 | /RH:hhmm-hhmm :: Run Hours - times when new copies may be started. |
||
| 249 | /PF :: check run hours on a Per File (not per pass) basis. |
||
| 250 | |||
| 251 | /IPG:n :: Inter-Packet Gap (ms), to free bandwidth on slow lines. |
||
| 252 | |||
| 253 | /SL :: copy symbolic links versus the target. |
||
| 254 | |||
| 255 | /MT[:n] :: Do multi-threaded copies with n threads (default 8). |
||
| 256 | n must be at least 1 and not greater than 128. |
||
| 257 | This option is incompatible with the /IPG and /EFSRAW options. |
||
| 258 | Redirect output using /LOG option for better performance. |
||
| 259 | |||
| 260 | /DCOPY:copyflag[s] :: what to COPY for directories (default is /DCOPY:DA). |
||
| 261 | (copyflags : D=Data, A=Attributes, T=Timestamps). |
||
| 262 | |||
| 263 | /NODCOPY :: COPY NO directory info (by default /DCOPY:DA is done). |
||
| 264 | |||
| 265 | /NOOFFLOAD :: copy files without using the Windows Copy Offload mechanism. |
||
| 266 | |||
| 267 | :: |
||
| 268 | :: File Selection Options : |
||
| 269 | :: |
||
| 270 | /A :: copy only files with the Archive attribute set. |
||
| 271 | /M :: copy only files with the Archive attribute and reset it. |
||
| 272 | /IA:[RASHCNETO] :: Include only files with any of the given Attributes set. |
||
| 273 | /XA:[RASHCNETO] :: eXclude files with any of the given Attributes set. |
||
| 274 | |||
| 275 | /XF file [file]... :: eXclude Files matching given names/paths/wildcards. |
||
| 276 | /XD dirs [dirs]... :: eXclude Directories matching given names/paths. |
||
| 277 | |||
| 278 | /XC :: eXclude Changed files. |
||
| 279 | /XN :: eXclude Newer files. |
||
| 280 | /XO :: eXclude Older files. |
||
| 281 | /XX :: eXclude eXtra files and directories. |
||
| 282 | /XL :: eXclude Lonely files and directories. |
||
| 283 | /IS :: Include Same files. |
||
| 284 | /IT :: Include Tweaked files. |
||
| 285 | |||
| 286 | /MAX:n :: MAXimum file size - exclude files bigger than n bytes. |
||
| 287 | /MIN:n :: MINimum file size - exclude files smaller than n bytes. |
||
| 288 | |||
| 289 | /MAXAGE:n :: MAXimum file AGE - exclude files older than n days/date. |
||
| 290 | /MINAGE:n :: MINimum file AGE - exclude files newer than n days/date. |
||
| 291 | /MAXLAD:n :: MAXimum Last Access Date - exclude files unused since n. |
||
| 292 | /MINLAD:n :: MINimum Last Access Date - exclude files used since n. |
||
| 293 | (If n < 1900 then n = n days, else n = YYYYMMDD date). |
||
| 294 | |||
| 295 | /XJ :: eXclude Junction points and symbolic links. (normally included by default). |
||
| 296 | |||
| 297 | /FFT :: assume FAT File Times (2-second granularity). |
||
| 298 | /DST :: compensate for one-hour DST time differences. |
||
| 299 | |||
| 300 | /XJD :: eXclude Junction points and symbolic links for Directories. |
||
| 301 | /XJF :: eXclude symbolic links for Files. |
||
| 302 | |||
| 303 | :: |
||
| 304 | :: Retry Options : |
||
| 305 | :: |
||
| 306 | /R:n :: number of Retries on failed copies: default 1 million. |
||
| 307 | /W:n :: Wait time between retries: default is 30 seconds. |
||
| 308 | |||
| 309 | /REG :: Save /R:n and /W:n in the Registry as default settings. |
||
| 310 | |||
| 311 | /TBD :: wait for sharenames To Be Defined (retry error 67). |
||
| 312 | |||
| 313 | :: |
||
| 314 | :: Logging Options : |
||
| 315 | :: |
||
| 316 | /L :: List only - don't copy, timestamp or delete any files. |
||
| 317 | /X :: report all eXtra files, not just those selected. |
||
| 318 | /V :: produce Verbose output, showing skipped files. |
||
| 319 | /TS :: include source file Time Stamps in the output. |
||
| 320 | /FP :: include Full Pathname of files in the output. |
||
| 321 | /BYTES :: Print sizes as bytes. |
||
| 322 | |||
| 323 | /NS :: No Size - don't log file sizes. |
||
| 324 | /NC :: No Class - don't log file classes. |
||
| 325 | /NFL :: No File List - don't log file names. |
||
| 326 | /NDL :: No Directory List - don't log directory names. |
||
| 327 | |||
| 328 | /NP :: No Progress - don't display percentage copied. |
||
| 329 | /ETA :: show Estimated Time of Arrival of copied files. |
||
| 330 | |||
| 331 | /LOG:file :: output status to LOG file (overwrite existing log). |
||
| 332 | /LOG+:file :: output status to LOG file (append to existing log). |
||
| 333 | |||
| 334 | /UNILOG:file :: output status to LOG file as UNICODE (overwrite existing log). |
||
| 335 | /UNILOG+:file :: output status to LOG file as UNICODE (append to existing log). |
||
| 336 | |||
| 337 | /TEE :: output to console window, as well as the log file. |
||
| 338 | |||
| 339 | /NJH :: No Job Header. |
||
| 340 | /NJS :: No Job Summary. |
||
| 341 | |||
| 342 | /UNICODE :: output status as UNICODE. |
||
| 343 | |||
| 344 | :: |
||
| 345 | :: Job Options : |
||
| 346 | :: |
||
| 347 | /JOB:jobname :: take parameters from the named JOB file. |
||
| 348 | /SAVE:jobname :: SAVE parameters to the named job file |
||
| 349 | /QUIT :: QUIT after processing command line (to view parameters). |
||
| 350 | /NOSD :: NO Source Directory is specified. |
||
| 351 | /NODD :: NO Destination Directory is specified. |
||
| 352 | /IF :: Include the following Files. |
||
| 353 | |||
| 354 | :: |
||
| 355 | :: Remarks : |
||
| 356 | :: |
||
| 357 | Using /PURGE or /MIR on the root directory of the volume formerly caused |
||
| 358 | robocopy to apply the requested operation on files inside the System |
||
| 359 | Volume Information directory as well. This is no longer the case; if |
||
| 360 | either is specified, robocopy will skip any files or directories with that |
||
| 361 | name in the top-level source and destination directories of the copy session. |
||
| 362 | ``` |