locked
Using mklink to move User Profile where Profile Name has spaces... RRS feed

  • Question

  • All,
    I'm using Windows 7 and I'm trying to move my user account off of c: on onto d:. The problem is that the user names have spaces in them.
     
    ie: "Robert Evans, Susan Jones, etc" and the profile destination also has spaces "User Profiles"
     
    Error Message:
    c:\>mklink /D C:\Users\Robert Evans d:\User Profiles\Robert Evens
    The syntax of the command is incorrect.
     
    I know it's because of the spaces because this will work:
     
    c:\>mklink /D C:\Users\RobertEvans d:\UserProfiles\RobertEvens
     
    I know that I can just change the name of each user but that would be a major undertaking.
     
    Any help would be greatly appreciated...
     
    Also:
     
    What is the difference between the /D and /J Switch and which is better to use?
    Is their any way to mklink to a network resource?
     
    Thanks in advance - CES

    Wednesday, November 4, 2009 5:05 PM

Answers

  • Hi

    You just need to enclose the command in quotes.

    eg:  c:\>mklink /D "C:\Users\Robert Evans d:\User Profiles\Robert Evens"

    In this case using the D switch (Symbolic Link) is a better idea than the J switch (Junction Point). You can get a good description and usage information for these soft links from Wikipedia.

    Hope this helps.


    Thank You for using Windows 7

    Ronnie Vernon MVP
    • Edited by Ronnie VernonMVP Wednesday, November 4, 2009 5:29 PM
    • Marked as answer by Sean Zhu - Thursday, November 5, 2009 1:21 AM
    Wednesday, November 4, 2009 5:14 PM

All replies

  • Hi

    You just need to enclose the command in quotes.

    eg:  c:\>mklink /D "C:\Users\Robert Evans d:\User Profiles\Robert Evens"

    In this case using the D switch (Symbolic Link) is a better idea than the J switch (Junction Point). You can get a good description and usage information for these soft links from Wikipedia.

    Hope this helps.


    Thank You for using Windows 7

    Ronnie Vernon MVP
    • Edited by Ronnie VernonMVP Wednesday, November 4, 2009 5:29 PM
    • Marked as answer by Sean Zhu - Thursday, November 5, 2009 1:21 AM
    Wednesday, November 4, 2009 5:14 PM
  • Thanks Ronnie "I'm a lot Dummer then I Look"
    Wednesday, November 4, 2009 5:21 PM
  • Don't worry c.santee, at least you are a good speller!
    Wednesday, April 20, 2011 6:29 AM