(Windows) Robocopy

Windows 2017. 4. 13. 20:24
728x90
728x170

https://technet.microsoft.com/en-us/library/cc733145.aspx

 

 

Syntax


robocopy <Source> <Destination> [<File>[ ...]] [<Options>]

Parameter

Description

<Source>

원본 디렉터리의 경로를 지정합니다.

<Destination>

대상 디렉토리의 경로를 지정합니다.

<File>

복사 할 파일을 지정합니다. You can use wildcard characters ( * or ? ), if you want. 원하는 경우 와일드 카드 문자 ( * 또는 ? )를 사용할 수 있습니다. If the File parameter is not specified, *.* is used as the default value. File 매개 변수를 지정하지 않으면 *. * 가 기본값으로 사용됩니다.

<Options>

robocopy 명령과 함께 사용할 옵션을 지정합니다.

Option

Description

/s

서브 디렉토리를 복사합니다. 이 옵션은 빈 디렉토리를 제외합니다.

/e

서브 디렉토리를 복사합니다. 이 옵션에는 빈 디렉토리가 포함됩니다. 자세한 내용은 주의 를 참조하십시오

/lev:<N>

소스 디렉토리 트리의 최상위 N 레벨 만 복사합니다.

/z

다시 시작 모드에서 파일을 복사합니다. .

/b

백업 모드에서 파일을 복사합니다.

/zb

다시 시작 모드를 사용합니다. 액세스가 거부되면이 옵션은 백업 모드를 사용합니다

/efsraw

EFS RAW 모드로 암호화 된 모든 파일을 복사합니다.

/copy:<CopyFlags>

복사 할 파일 특성을 지정합니다. The following are the valid values for this option: 이 옵션의 유효한 값은 다음과 같습니다.

D Data D 데이터

A Attributes 속성

T Time stamps T 타임 스탬프

S NTFS access control list (ACL) S NTFS 액세스 제어 목록 (ACL)

O Owner information O 소유자 정보

U Auditing information U 감사 정보

The default value for CopyFlags is DAT (data, attributes, and time stamps). CopyFlags 의 기본값은 DAT (데이터, 속성 및 시간 소인)입니다.

/dcopy:T

디렉토리 시간 소인을 복사합니다.

/sec

보안이 설정된 파일을 복사합니다 ( / copy : DAT 와 동일).

/copyall

모든 파일 정보를 복사합니다 ( / copy : DATSOU와 동일 ).

/nocopy

파일 정보를 복사하지 않습니다 ( / purge 와 함께 사용하면 유용합니다).

/secfix

건너 뛴 파일이라도 모든 파일에 대한 파일 보안을 수정합니다.

/timfix

건너 뛴 파일까지 모든 파일에 대해 파일 시간을 수정합니다.

/purge

소스에 더 이상 존재하지 않는 대상 파일 및 디렉토리를 삭제합니다. 자세한 내용은 주의 를 참조하십시오.

/mir

디렉토리 트리를 미러링합니다 ( / e plus / purge 와 동일). 자세한 내용은 주의 를 참조하십시오

/mov

파일을 복사 한 후 소스에서 삭제합니다.

/move

파일과 디렉토리를 이동하고 복사 한 후 소스에서 삭제합니다.

/a+:[RASHCNET]

지정된 특성을 복사 된 파일에 추가합니다.

/a-:[RASHCNET]

복사 된 파일에서 지정된 속성을 제거합니다.

/create

디렉토리 트리 및 길이가 0 인 파일 만 작성합니다.

/fat

8.3 문자 길이의 FAT 파일 이름 만 사용하여 대상 파일을 만듭니다.

/256

매우 긴 경로 (256 자 이상)에 대한 지원을 끕니다.

/mon:<N>

Monitors the source, and runs again when more than N changes are detected.

/mot:<M>

Monitors source, and runs again in M minutes if changes are detected.

/MT[:N]

Creates multi-threaded copies with N threads. N must be an integer between 1 and 128. The default value for N is 8.

The /MT parameter cannot be used with the /IPG and /EFSRAW parameters.

Redirect output using /LOG option for better performance.

System_CAPS_noteNote

The /MT parameter applies to Windows Server 2008 R2 and Windows 7.

/rh:hhmm-hhmm

Specifies run times when new copies may be started.

/pf

Checks run times on a per-file (not per-pass) basis.

/ipg:n

Specifies the inter-packet gap to free bandwidth on slow lines.

/sl

Copies the symbolic link instead of the target.

System_CAPS_importantImportant

When using the /SECFIX copy option, specify the type of security information you want to copy by also using one of these additional copy options:

  • /COPYALL

  • /COPY:O

  • /COPY:S

  • /COPY:U

  • /SEC

Option

Description

/a

Copies only files for which the Archive attribute is set.

/m

Copies only files for which the Archive attribute is set, and resets the Archive attribute.

/ia:[RASHCNETO]

Includes only files for which any of the specified attributes are set.

/xa:[RASHCNETO]

Excludes files for which any of the specified attributes are set.

/xf <FileName>[ ...]

Excludes files that match the specified names or paths. Note that FileName can include wildcard characters (* and ?).

/xd <Directory>[ ...]

Excludes directories that match the specified names and paths.

/xct

Excludes changed files.

/xn

Excludes newer files.

/xo

Excludes older files.

/xx

Excludes extra files and directories.

/xl

Excludes "lonely" files and directories.

/is

Includes the same files.

/it

Includes "tweaked" files.

/max:<N>

Specifies the maximum file size (to exclude files bigger than N bytes).

/min:<N>

Specifies the minimum file size (to exclude files smaller than N bytes).

/maxage:<N>

Specifies the maximum file age (to exclude files older than N days or date).

/minage:<N>

Specifies the minimum file age (exclude files newer than N days or date).

/maxlad:<N>

Specifies the maximum last access date (excludes files unused since N).

/minlad:<N>

Specifies the minimum last access date (excludes files used since N) If N is less than 1900, N specifies the number of days. Otherwise, N specifies a date in the format YYYYMMDD.

/xj

Excludes junction points, which are normally included by default.

/fft

Assumes FAT file times (two-second precision).

/dst

Compensates for one-hour DST time differences.

/xjd

Excludes junction points for directories.

/xjf

Excludes junction points for files.

Option

Description

/r:<N>

Specifies the number of retries on failed copies. The default value of N is 1,000,000 (one million retries).

/w:<N>

Specifies the wait time between retries, in seconds. The default value of N is 30 (wait time 30 seconds).

/reg

Saves the values specified in the /r and /w options as default settings in the registry.

/tbd

Specifies that the system will wait for share names to be defined (retry error 67).

Option

Description

/l

Specifies that files are to be listed only (and not copied, deleted, or time stamped).

/x

Reports all extra files, not just those that are selected.

/v

Produces verbose output, and shows all skipped files.

/ts

Includes source file time stamps in the output.

/fp

Includes the full path names of the files in the output.

/bytes

Prints sizes, as bytes.

/ns

Specifies that file sizes are not to be logged.

/nc

파일 클래스를 로깅하지 않도록 지정합니다.

/nfl

파일 이름을 기록하지 않도록 지정합니다.

/ndl

디렉토리 이름을 기록하지 않도록 지정합니다.

/np

복사 작업의 진행률 (지금까지 복사 된 파일 또는 디렉토리의 수)이 표시되지 않도록 지정합니다.

/eta

복사 된 파일의 예상 도착 시간 (ETA)을 표시합니다.

/log:<LogFile>

상태 출력을 로그 파일에 씁니다 (기존 로그 파일을 덮어 씁니다).

/log+:<LogFile>

상태 출력을 로그 파일에 씁니다 (출력을 기존 로그 파일에 추가).

/unicode

상태 출력을 유니 코드 텍스트로 표시합니다.

/unilog:<LogFile>

상태 출력을 유니 코드 텍스트로 로그 파일에 씁니다 (기존 로그 파일을 덮어 씁니다).

/unilog+:<LogFile>

상태 출력을 유니 코드 텍스트로 로그 파일에 씁니다 (출력을 기존 로그 파일에 추가).

/tee

콘솔 창뿐만 아니라 로그 파일에 상태 출력을 기록합니다.

/njh

작업 헤더가 없음을 지정합니다.

/njs

작업 요약이 없음을 지정합니다.

Option

Description

/job:<JobName>

매개 변수가 지정된 작업 파일에서 파생되도록 지정합니다.

/save:<JobName>

매개 변수가 지정된 작업 파일에 저장되도록 지정합니다.

/quit

명령 행을 처리 한 후 종료합니다 (매개 변수보기).

/nosd

소스 디렉토리가 지정되지 않았 음을 나타냅니다.

/nodd

대상 디렉토리가 지정되지 않았 음을 나타냅니다.

/if

지정된 파일을 포함합니다.

  • / mir 옵션은 / e plus / purge 옵션과 동일하지만 동작에 약간의 차이가 있습니다.

    • With the /e plus /purge options, if the destination directory exists, the destination directory security settings are not overwritten. / e plus / purge 옵션을 사용하면 대상 디렉터리가있는 경우 대상 디렉터리 보안 설정을 덮어 쓰지 않습니다.

    • With the /mir option, if the destination directory exists, the destination directory security settings are overwritten. / mir 옵션을 사용하면 대상 디렉터리가 있으면 대상 디렉터리 보안 설정을 덮어 씁니다.

728x90
그리드형
Posted by kjun
,