Announcement

Collapse
No announcement yet.

Login script error with symbol in share name

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Login script error with symbol in share name

    Hello,

    I have a simple batch file that I created for a certain group to map their shared drivers in Server 2003. The scripts maps all shares fine except for one share that has a symbol as part of its share name. Is there a parameter that I can insert so that it sees the full share name? I do not want to rename the share if I do not have to. the command is below as well as the error when I run it from the command line. Thanks!

    net use k: \\ servername\something1&something2 /persistent:yes


    System error 53 occured.
    The network path was not found.
    'something2' is not recognized as an internal or external command, operable program or batch file.

  • #2
    Re: Login script error with symbol in share name

    Try enclosing the UNC path in quotes, such as:

    net use k: "\\ servername\something1&something2" /persistent:yes

    Comment


    • #3
      Re: Login script error with symbol in share name

      There are several characters that have special functions in batch files. "&" is one of them. Use the caret to escape the character.

      Code:
      net use k: \\servername\something1^&something2 /persistent:yes
      Regards,
      Jeremy

      Network Consultant/Engineer
      Baltimore - Washington area and beyond
      www.gma-cpa.com

      Comment


      • #4
        Re: Login script error with symbol in share name

        Both suggestions worked. Thanks!!!

        Comment


        • #5
          Re: Login script error with symbol in share name

          Glad to help.

          Comment

          Working...
          X