プロジェクト

全般

プロフィール

Robocopy » 履歴 » バージョン 5

sylow castle, 2019/04/23 15:17
無駄な努力お疲れ俺

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