파일 및 설정 포함
마이그레이션 .xml 파일을 지정하면 사용자 상태 마이그레이션 도구(USMT) 5.0는 USMT가 마이그레이션하는 항목에 지정된 설정과 구성 요소를 마이그레이션합니다. 추가 파일과 설정을 포함하려면 사용자 지정 .xml 파일을 만든 다음 ScanState 및 LoadState 명령을 사용할 때 이 파일을 포함하는 것이 좋습니다. 사용자 지정 .xml 파일을 만들면 변경 내용을 기본 .xml 파일과 별도로 유지할 수 있으므로 수정 내용을 쉽게 추적할 수 있습니다.
이 항목의 내용:
단일 레지스트리 키 마이그레이션
특정 폴더 마이그레이션
특정 드라이브에서 폴더 마이그레이션
임의 위치에서 폴더 마이그레이션
파일 형식을 특정 폴더로 마이그레이션
특정 파일 마이그레이션
단일 레지스트리 키 마이그레이션
다음 .xml 파일은 단일 레지스트리 키를 마이그레이션합니다.
<migration urlid="https://www.microsoft.com/migration/1.0/migxmlext/test">
<component type="Application" context="System">
<displayName>Component to migrate only registry value string</displayName>
<role role="Settings">
<rules>
<include>
<objectSet>
<pattern type="Registry">HKLM\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache [Persistent]</pattern>
</objectSet>
</include>
</rules>
</role>
</component>
</migration>
특정 폴더 마이그레이션
다음 예에서는 특정 드라이브와 컴퓨터의 임의 위치에서 폴더를 마이그레이션하는 방법을 보여 줍니다.
특정 드라이브에서 폴더 마이그레이션
하위 폴더 포함. 다음 .xml 파일은 C:\EngineeringDrafts의 모든 파일 및 하위 폴더를 대상 컴퓨터로 마이그레이션합니다.
<migration urlid="https://www.microsoft.com/migration/1.0/migxmlext/test"> <component type="Documents" context="System"> <displayName>Component to migrate all Engineering Drafts Documents including subfolders</displayName> <role role="Data"> <rules> <include> <objectSet> <pattern type="File">C:\EngineeringDrafts\* [*]</pattern> </objectSet> </include> </rules> </role> </component> </migration>
하위 폴더 제외. 다음 .xml 파일은 C:\EngineeringDrafts에서 모든 파일을 마이그레이션하지만 C:\EngineeringDrafts 내의 하위 폴더는 마이그레이션하지 않습니다.
<migration urlid="https://www.microsoft.com/migration/1.0/migxmlext/test"> <component type="Documents" context="System"> <displayName>Component to migrate all Engineering Drafts Documents without subfolders</displayName> <role role="Data"> <rules> <include> <objectSet> <pattern type="File"> C:\EngineeringDrafts\ [*]</pattern> </objectSet> </include> </rules> </role> </component> </migration>
임의 위치에서 폴더 마이그레이션
다음 .xml 파일은 컴퓨터의 임의 드라이브에서 EngineeringDrafts 폴더의 모든 파일 및 하위 폴더를 마이그레이션합니다. 동일한 이름의 폴더가 여러 개 있는 경우 이 이름을 가진 모든 파일이 마이그레이션됩니다.
<migration urlid="https://www.microsoft.com/migration/1.0/migxmlext/test">
<component type="Documents" context="System">
<displayName>Component to migrate all Engineering Drafts Documents folder on any drive on the computer </displayName>
<role role="Data">
<rules>
<include>
<objectSet>
<script>MigXmlHelper.GenerateDrivePatterns ("\EngineeringDrafts\* [*] ", "Fixed")</script>
<script>MigXmlHelper.GenerateDrivePatterns ("*\EngineeringDrafts\* [*] ", "Fixed")</script>
</objectSet>
</include>
</rules>
</role>
</component>
</migration>
다음 .xml 파일은 컴퓨터의 C:\ 드라이브의 임의 위치에서 EngineeringDrafts 폴더의 모든 파일 및 하위 폴더를 마이그레이션합니다. 동일한 이름의 폴더가 여러 개 있는 경우 모두 마이그레이션됩니다.
<migration urlid="https://www.microsoft.com/migration/1.0/migxmlext/test">
<component type="Documents" context="System">
<displayName>Component to migrate all Engineering Drafts Documents EngineeringDrafts folder from where ever it exists on the C: drive </displayName>
<role role="Data">
<rules>
<include>
<objectSet>
<pattern type="File"> C:\*\EngineeringDrafts\* [*]</pattern>
<pattern type="File"> C:\EngineeringDrafts\* [*]</pattern>
</objectSet>
</include>
</rules>
</role>
</component>
</migration>
파일 형식을 특정 폴더로 마이그레이션
다음 .xml 파일은 원본 컴퓨터의 지정된 드라이브에 있는 .mp3 파일을 대상 컴퓨터의 C:\Music 폴더로 마이그레이션합니다.
<migration urlid="https://www.microsoft.com/migration/1.0/migxmlext/test">
<component type="Documents" context="System">
<displayName>All .mp3 files to My Documents</displayName>
<role role="Data">
<rules>
<include>
<objectSet>
<script>MigXmlHelper.GenerateDrivePatterns ("* [*.mp3]", "Fixed")</script>
</objectSet>
</include>
<!-- Migrates all the .mp3 files in the store to the C:\Music folder during LoadState -->
<locationModify script="MigXmlHelper.Move('C:\Music')">
<objectSet>
<script>MigXmlHelper.GenerateDrivePatterns ("* [*.mp3]", "Fixed")</script>
</objectSet>
</locationModify>
</rules>
</role>
</component>
</migration>
특정 파일 마이그레이션
다음 예에서는 각각 특정 폴더에서 파일을 마이그레이션하는 방법 및 임의 위치에서 파일을 마이그레이션하는 방법을 보여 줍니다.
폴더에서 파일을 마이그레이션하는 방법. 다음 .xml 파일은 원본 컴퓨터의 C:\EngineeringDrafts에서 Sample.doc 파일만 대상 컴퓨터로 마이그레이션합니다.
<migration urlid="https://www.microsoft.com/migration/1.0/migxmlext/test"> <component type="Documents" context="System"> <displayName>Component to migrate all Engineering Drafts Documents</displayName> <role role="Data"> <rules> <include> <objectSet> <pattern type="File"> C:\EngineeringDrafts\ [Sample.doc]</pattern> </objectSet> </include> </rules> </role> </component> </migration>
임의 위치에서 파일을 마이그레이션하는 방법. C:\ 드라이브의 임의 위치에서 Sample.doc 파일을 마이그레이션하려면 다음 예와 같이 <pattern> 요소를 사용합니다. C:\ 드라이브에 동일한 이름의 파일이 여러 개 있는 경우 이 이름을 가진 모든 파일이 마이그레이션됩니다.
<pattern type="File"> C:\* [Sample.doc] </pattern>
컴퓨터의 임의 드라이브에서 Sample.doc 파일을 마이그레이션하려면 다음 예와 같이 <script>를 사용합니다. 동일한 이름의 파일이 여러 개 있는 경우 이 이름을 가진 모든 파일이 마이그레이션됩니다.
<script>MigXmlHelper.GenerateDrivePatterns("* [sample.doc]", "Fixed")</script>