2016-07-13 1 views

답변

1

내가 말할 수있는 한 네이티브 robocopy 스위치로는 불가능합니다. 스크립트를 사용하여 하위 디렉토리를 열거하고 이에 대해 robocopy를 실행해야합니다.

다음은 c : \ temp \ source에있는 파일을 제외하고 C : \ temp \ source \에서 c : \ temp \ target \으로 모든 내용을 복사하여 원하는대로 수행하는 예제 PowerShell 명령입니다.

get-childitem c:\temp\source\* |?{$_.PsIsContainer} | %{robocopy $_.FullName c:\temp\target\$($_.Name) /S} 

기본 사항은 powershell ignore files in root but robocopy folders and their contents입니다.