Robocopy » 履歴 » バージョン 2
sylow castle, 2019/04/21 22:20
| 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 | /A+:[RASHCNET] :: add the given Attributes to copied files. |
||
| 74 | /A-:[RASHCNET] :: remove the given Attributes from copied files. |
||
| 75 | |||
| 76 | /CREATE :: CREATE directory tree and zero-length files only. |
||
| 77 | /FAT :: create destination files using 8.3 FAT file names only. |
||
| 78 | /256 :: turn off very long path (> 256 characters) support. |
||
| 79 | |||
| 80 | /MON:n :: MONitor source; run again when more than n changes seen. |
||
| 81 | /MOT:m :: MOnitor source; run again in m minutes Time, if changed. |
||
| 82 | |||
| 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 | |||
| 86 | /IPG:n :: Inter-Packet Gap (ms), to free bandwidth on slow lines. |
||
| 87 | |||
| 88 | /SL :: copy symbolic links versus the target. |
||
| 89 | |||
| 90 | /MT[:n] :: Do multi-threaded copies with n threads (default 8). |
||
| 91 | n must be at least 1 and not greater than 128. |
||
| 92 | This option is incompatible with the /IPG and /EFSRAW options. |
||
| 93 | Redirect output using /LOG option for better performance. |
||
| 94 | |||
| 95 | /DCOPY:copyflag[s] :: what to COPY for directories (default is /DCOPY:DA). |
||
| 96 | (copyflags : D=Data, A=Attributes, T=Timestamps). |
||
| 97 | |||
| 98 | /NODCOPY :: COPY NO directory info (by default /DCOPY:DA is done). |
||
| 99 | |||
| 100 | /NOOFFLOAD :: copy files without using the Windows Copy Offload mechanism. |
||
| 101 | 1 | sylow castle | ``` |
| 102 | 2 | sylow castle | |
| 103 | ### メモ |
||
| 104 | |||
| 105 | * 再開モード |
||
| 106 | ちょっとずつ、部分的にファイルをコピーしていくらしい。途中で失敗したら途中から再開するらしい。 |
||
| 107 | 大きなファイルとかコピーするときに使うといいってさ。 |
||
| 108 | https://stackoverflow.com/questions/20982968/what-is-robocopys-restartable-option |
||
| 109 | 1 | sylow castle | |
| 110 | |||
| 111 | ## 元の文 |
||
| 112 | |||
| 113 | ### その1 |
||
| 114 | |||
| 115 | ``` |
||
| 116 | robocopy /help |
||
| 117 | |||
| 118 | ------------------------------------------------------------------------------- |
||
| 119 | ROBOCOPY :: Robust File Copy for Windows |
||
| 120 | ------------------------------------------------------------------------------- |
||
| 121 | |||
| 122 | Started : 2019年4月21日 21:49:46 |
||
| 123 | Source - |
||
| 124 | Dest - |
||
| 125 | |||
| 126 | Files : |
||
| 127 | Options : /DCOPY:DA /COPY:DAT /R:1000000 /W:30 |
||
| 128 | |||
| 129 | ------------------------------------------------------------------------------ |
||
| 130 | |||
| 131 | ERROR : Invalid Parameter #1 : "/help" |
||
| 132 | |||
| 133 | Simple Usage :: ROBOCOPY source destination /MIR |
||
| 134 | |||
| 135 | source :: Source Directory (drive:\path or \\server\share\path). |
||
| 136 | destination :: Destination Dir (drive:\path or \\server\share\path). |
||
| 137 | /MIR :: Mirror a complete directory tree. |
||
| 138 | |||
| 139 | For more usage information run ROBOCOPY /? |
||
| 140 | |||
| 141 | |||
| 142 | **** /MIR can DELETE files as well as copy them ! |
||
| 143 | ``` |
||
| 144 | |||
| 145 | ### その2 |
||
| 146 | |||
| 147 | ``` |
||
| 148 | robocopy /? |
||
| 149 | |||
| 150 | ------------------------------------------------------------------------------- |
||
| 151 | ROBOCOPY :: Robust File Copy for Windows |
||
| 152 | ------------------------------------------------------------------------------- |
||
| 153 | |||
| 154 | Started : 2019年4月21日 21:50:27 |
||
| 155 | Usage :: ROBOCOPY source destination [file [file]...] [options] |
||
| 156 | |||
| 157 | source :: Source Directory (drive:\path or \\server\share\path). |
||
| 158 | destination :: Destination Dir (drive:\path or \\server\share\path). |
||
| 159 | file :: File(s) to copy (names/wildcards: default is "*.*"). |
||
| 160 | |||
| 161 | :: |
||
| 162 | :: Copy options : |
||
| 163 | :: |
||
| 164 | /S :: copy Subdirectories, but not empty ones. |
||
| 165 | /E :: copy subdirectories, including Empty ones. |
||
| 166 | /LEV:n :: only copy the top n LEVels of the source directory tree. |
||
| 167 | |||
| 168 | /Z :: copy files in restartable mode. |
||
| 169 | /B :: copy files in Backup mode. |
||
| 170 | /ZB :: use restartable mode; if access denied use Backup mode. |
||
| 171 | /J :: copy using unbuffered I/O (recommended for large files). |
||
| 172 | /EFSRAW :: copy all encrypted files in EFS RAW mode. |
||
| 173 | |||
| 174 | /COPY:copyflag[s] :: what to COPY for files (default is /COPY:DAT). |
||
| 175 | (copyflags : D=Data, A=Attributes, T=Timestamps). |
||
| 176 | (S=Security=NTFS ACLs, O=Owner info, U=aUditing info). |
||
| 177 | |||
| 178 | |||
| 179 | /SEC :: copy files with SECurity (equivalent to /COPY:DATS). |
||
| 180 | /COPYALL :: COPY ALL file info (equivalent to /COPY:DATSOU). |
||
| 181 | /NOCOPY :: COPY NO file info (useful with /PURGE). |
||
| 182 | /SECFIX :: FIX file SECurity on all files, even skipped files. |
||
| 183 | /TIMFIX :: FIX file TIMes on all files, even skipped files. |
||
| 184 | |||
| 185 | /PURGE :: delete dest files/dirs that no longer exist in source. |
||
| 186 | /MIR :: MIRror a directory tree (equivalent to /E plus /PURGE). |
||
| 187 | |||
| 188 | /MOV :: MOVe files (delete from source after copying). |
||
| 189 | /MOVE :: MOVE files AND dirs (delete from source after copying). |
||
| 190 | |||
| 191 | /A+:[RASHCNET] :: add the given Attributes to copied files. |
||
| 192 | /A-:[RASHCNET] :: remove the given Attributes from copied files. |
||
| 193 | |||
| 194 | /CREATE :: CREATE directory tree and zero-length files only. |
||
| 195 | /FAT :: create destination files using 8.3 FAT file names only. |
||
| 196 | /256 :: turn off very long path (> 256 characters) support. |
||
| 197 | |||
| 198 | /MON:n :: MONitor source; run again when more than n changes seen. |
||
| 199 | /MOT:m :: MOnitor source; run again in m minutes Time, if changed. |
||
| 200 | |||
| 201 | /RH:hhmm-hhmm :: Run Hours - times when new copies may be started. |
||
| 202 | /PF :: check run hours on a Per File (not per pass) basis. |
||
| 203 | |||
| 204 | /IPG:n :: Inter-Packet Gap (ms), to free bandwidth on slow lines. |
||
| 205 | |||
| 206 | /SL :: copy symbolic links versus the target. |
||
| 207 | |||
| 208 | /MT[:n] :: Do multi-threaded copies with n threads (default 8). |
||
| 209 | n must be at least 1 and not greater than 128. |
||
| 210 | This option is incompatible with the /IPG and /EFSRAW options. |
||
| 211 | Redirect output using /LOG option for better performance. |
||
| 212 | |||
| 213 | /DCOPY:copyflag[s] :: what to COPY for directories (default is /DCOPY:DA). |
||
| 214 | (copyflags : D=Data, A=Attributes, T=Timestamps). |
||
| 215 | |||
| 216 | /NODCOPY :: COPY NO directory info (by default /DCOPY:DA is done). |
||
| 217 | |||
| 218 | /NOOFFLOAD :: copy files without using the Windows Copy Offload mechanism. |
||
| 219 | |||
| 220 | :: |
||
| 221 | :: File Selection Options : |
||
| 222 | :: |
||
| 223 | /A :: copy only files with the Archive attribute set. |
||
| 224 | /M :: copy only files with the Archive attribute and reset it. |
||
| 225 | /IA:[RASHCNETO] :: Include only files with any of the given Attributes set. |
||
| 226 | /XA:[RASHCNETO] :: eXclude files with any of the given Attributes set. |
||
| 227 | |||
| 228 | /XF file [file]... :: eXclude Files matching given names/paths/wildcards. |
||
| 229 | /XD dirs [dirs]... :: eXclude Directories matching given names/paths. |
||
| 230 | |||
| 231 | /XC :: eXclude Changed files. |
||
| 232 | /XN :: eXclude Newer files. |
||
| 233 | /XO :: eXclude Older files. |
||
| 234 | /XX :: eXclude eXtra files and directories. |
||
| 235 | /XL :: eXclude Lonely files and directories. |
||
| 236 | /IS :: Include Same files. |
||
| 237 | /IT :: Include Tweaked files. |
||
| 238 | |||
| 239 | /MAX:n :: MAXimum file size - exclude files bigger than n bytes. |
||
| 240 | /MIN:n :: MINimum file size - exclude files smaller than n bytes. |
||
| 241 | |||
| 242 | /MAXAGE:n :: MAXimum file AGE - exclude files older than n days/date. |
||
| 243 | /MINAGE:n :: MINimum file AGE - exclude files newer than n days/date. |
||
| 244 | /MAXLAD:n :: MAXimum Last Access Date - exclude files unused since n. |
||
| 245 | /MINLAD:n :: MINimum Last Access Date - exclude files used since n. |
||
| 246 | (If n < 1900 then n = n days, else n = YYYYMMDD date). |
||
| 247 | |||
| 248 | /XJ :: eXclude Junction points and symbolic links. (normally included by default). |
||
| 249 | |||
| 250 | /FFT :: assume FAT File Times (2-second granularity). |
||
| 251 | /DST :: compensate for one-hour DST time differences. |
||
| 252 | |||
| 253 | /XJD :: eXclude Junction points and symbolic links for Directories. |
||
| 254 | /XJF :: eXclude symbolic links for Files. |
||
| 255 | |||
| 256 | :: |
||
| 257 | :: Retry Options : |
||
| 258 | :: |
||
| 259 | /R:n :: number of Retries on failed copies: default 1 million. |
||
| 260 | /W:n :: Wait time between retries: default is 30 seconds. |
||
| 261 | |||
| 262 | /REG :: Save /R:n and /W:n in the Registry as default settings. |
||
| 263 | |||
| 264 | /TBD :: wait for sharenames To Be Defined (retry error 67). |
||
| 265 | |||
| 266 | :: |
||
| 267 | :: Logging Options : |
||
| 268 | :: |
||
| 269 | /L :: List only - don't copy, timestamp or delete any files. |
||
| 270 | /X :: report all eXtra files, not just those selected. |
||
| 271 | /V :: produce Verbose output, showing skipped files. |
||
| 272 | /TS :: include source file Time Stamps in the output. |
||
| 273 | /FP :: include Full Pathname of files in the output. |
||
| 274 | /BYTES :: Print sizes as bytes. |
||
| 275 | |||
| 276 | /NS :: No Size - don't log file sizes. |
||
| 277 | /NC :: No Class - don't log file classes. |
||
| 278 | /NFL :: No File List - don't log file names. |
||
| 279 | /NDL :: No Directory List - don't log directory names. |
||
| 280 | |||
| 281 | /NP :: No Progress - don't display percentage copied. |
||
| 282 | /ETA :: show Estimated Time of Arrival of copied files. |
||
| 283 | |||
| 284 | /LOG:file :: output status to LOG file (overwrite existing log). |
||
| 285 | /LOG+:file :: output status to LOG file (append to existing log). |
||
| 286 | |||
| 287 | /UNILOG:file :: output status to LOG file as UNICODE (overwrite existing log). |
||
| 288 | /UNILOG+:file :: output status to LOG file as UNICODE (append to existing log). |
||
| 289 | |||
| 290 | /TEE :: output to console window, as well as the log file. |
||
| 291 | |||
| 292 | /NJH :: No Job Header. |
||
| 293 | /NJS :: No Job Summary. |
||
| 294 | |||
| 295 | /UNICODE :: output status as UNICODE. |
||
| 296 | |||
| 297 | :: |
||
| 298 | :: Job Options : |
||
| 299 | :: |
||
| 300 | /JOB:jobname :: take parameters from the named JOB file. |
||
| 301 | /SAVE:jobname :: SAVE parameters to the named job file |
||
| 302 | /QUIT :: QUIT after processing command line (to view parameters). |
||
| 303 | /NOSD :: NO Source Directory is specified. |
||
| 304 | /NODD :: NO Destination Directory is specified. |
||
| 305 | /IF :: Include the following Files. |
||
| 306 | |||
| 307 | :: |
||
| 308 | :: Remarks : |
||
| 309 | :: |
||
| 310 | Using /PURGE or /MIR on the root directory of the volume formerly caused |
||
| 311 | robocopy to apply the requested operation on files inside the System |
||
| 312 | Volume Information directory as well. This is no longer the case; if |
||
| 313 | either is specified, robocopy will skip any files or directories with that |
||
| 314 | name in the top-level source and destination directories of the copy session. |
||
| 315 | ``` |