파일 및 설정 경로 전환

파일 및 설정을 다시 라우팅하려면 사용자 지정 .xml 파일을 만들고 및 LoadState.exe 명령줄 모두에서 ScanState.exe.xml 파일 이름을 지정합니다. 사용자 지정 .xml 파일을 사용하면 변경 내용을 기본 .xml 파일과 별도로 유지할 수 있으므로 수정 내용을 더 쉽게 추적할 수 있습니다.

폴더 경로 다시 지정

다음 사용자 지정 .xml 파일은 디렉터리와 파일을 에서 C:\EngineeringDrafts 모든 사용자의 Documents 폴더로 마이그레이션합니다. %CSIDL_PERSONAL%사용자> 데스크톱 항목을 나타내는< 가상 폴더로, CSIDL_MYDOCUMENTS 동일합니다.

<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/test">
<component type="Documents" context="User">
  <displayName>Engineering Drafts Documents to Personal Folder</displayName>
  <role role="Data">
    <rules>
      <!-- Migrate all directories and files present in c:\EngineeringDrafts folder -->
      <include>
        <objectSet>
          <pattern type="File">C:\EngineeringDrafts\* [*]</pattern>
        </objectSet>
      </include>
      <!-- This migrates all files and directories from C:\EngineeringDrafts to every user's personal folder.-->
      <locationModify script="MigXmlHelper.RelativeMove('C:\EngineeringDrafts','%CSIDL_PERSONAL%')">
        <objectSet>
          <pattern type="File">C:\EngineeringDrafts\* [*]</pattern>
        </objectSet>
      </locationModify>
    </rules>
  </role>
</component>
</migration>

특정 파일 형식 다시 라우팅

다음 사용자 지정 .xml 파일은 원본 컴퓨터의 고정 드라이브에 있는 .mp3 파일을 대상 컴퓨터의 C:\Music 폴더로 다시 라우팅합니다.

<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/test">
<component type="Documents" context="System">
  <displayName>All .mp3 files to the Documents folder</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 모든 사용자의 Documents 폴더로 마이그레이션 Sample.doc 합니다. %CSIDL_PERSONAL%사용자> 데스크톱 항목을 나타내는< 가상 폴더로, CSIDL_MYDOCUMENTS 동일합니다.

<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/test">
<component type="Documents" context="User">
<displayName>Sample.doc into the Documents folder</displayName>
    <role role="Data">
      <rules>
        <include> 
          <objectSet>     
                 <pattern type="File"> C:\EngineeringDrafts\ [Sample.doc]</pattern>
          </objectSet>
        </include>
       <locationModify script="MigXmlHelper.RelativeMove('C:\EngineeringDrafts','%CSIDL_PERSONAL%')">
        <objectSet>
                 <pattern type="File"> C:\EngineeringDrafts\ [Sample.doc]</pattern>
        </objectSet>
       </locationModify>
      </rules>
    </role>
</component>
</migration>