none
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>
    		<paths>
    			<path type="File">%CSIDL_DESKTOP%</path>
    		</paths>
    		<role role="Settings">
    			<detects>
    				<detect>
    					<condition>MigXmlHelper.DoesObjectExist("File","%CSIDL_DESKTOP%")</condition>
    				</detect>
    			</detects>
    			<rules>
    				<include filter='MigXmlHelper.IgnoreIrrelevantLinks()'>
    					<objectSet>
    						<pattern type="File">%CSIDL_DESKTOP%\* [*]</pattern>
    					</objectSet>
    				</include>
    				<!-- Move .LNK files -->
    				<locationModify script="MigXmlHelper.Move('%CSIDL_DESKTOP%\Old_Shortcuts_1')">
    					<objectSet>
    						<pattern type="File">%CSIDL_DESKTOP% [*.lnk]</pattern>
    						<pattern type="File">%CSIDL_DESKTOP%\* [*.lnk]</pattern>
    					</objectSet>
    				</locationModify>
    				<merge script="MigXmlHelper.DestinationPriority()">
    					<objectSet>
    						<pattern type="File">%CSIDL_DESKTOP% [desktop.ini]</pattern>
    						<pattern type="File">%CSIDL_DESKTOP%\* [*]</pattern>
    					</objectSet>
    				</merge>
    			</rules>
    		</role>
    	</component>

    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