USMT: Move Certain File Types to Different Directory Leaves a Copy Behind RRS feed

  • Question

  • During loadstate, I'd like to have USMT move all .LNK's on the Desktop into a separate directory; leaving no .LNK files on the desktop.

    The XML below will put .LNK files in the specified directory, but it will curiously also leave all the .LNK files on the desktop.  (So I'm left with 2 copies of each .LNK: one in the specified directory & one on the desktop).

        <!-- This component migrates Desktop files -->
        <component type="Documents" context="User">
    		<displayName _locID="miguser.desktop">Desktop</displayName>
    			<path type="File">%CSIDL_DESKTOP%</path>
    		<role role="Settings">
    				<include filter='MigXmlHelper.IgnoreIrrelevantLinks()'>
    						<pattern type="File">%CSIDL_DESKTOP%\* [*]</pattern>
    				<!-- Move .LNK files -->
    				<locationModify script="MigXmlHelper.Move('%CSIDL_DESKTOP%\Old_Shortcuts_1')">
    						<pattern type="File">%CSIDL_DESKTOP% [*.lnk]</pattern>
    						<pattern type="File">%CSIDL_DESKTOP%\* [*.lnk]</pattern>
    				<merge script="MigXmlHelper.DestinationPriority()">
    						<pattern type="File">%CSIDL_DESKTOP% [desktop.ini]</pattern>
    						<pattern type="File">%CSIDL_DESKTOP%\* [*]</pattern>

    Hoping someone can someone help me better understand what's missing/wrong.

    Using USMT 10[.0.10586.0]; Source machine Win 7; Destination Win 10.

    • Edited by JuliusPIV Friday, June 17, 2016 2:59 PM
    Thursday, June 16, 2016 10:42 PM

All replies