Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Jul 2001
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Dos and the '&' symbol

    Help,

    I am trying to write a simple dos batch file to backup some files. Only problem is that some twit has used a "&" in the directory name of the destination drive.

    (e.g. xcopy z:*.* n:....QUAL&C~1...)

    This confuses the heck out of DOS and it can't cope !!

    I can't rename the directory and the dos short form of the directory name also contains the dreaded character....

    Specifics: -
    Windows SubDir name = "Qual & Certification"
    Short DOS name = "Qual&C~1"
    Operating System = NT4

    As any body got any ideas ????

    Thanks in advance!

  2. #2
    Star Lounger
    Join Date
    Jan 2001
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Dos and the '&' symbol

    Try enclosing the path in quotes: "g:Good&Plenty"

  3. #3
    New Lounger
    Join Date
    Jul 2001
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Dos and the '&' symbol

    Thanks - it works ! I must sau have not done a lot with it for a while.

    Cheers

  4. #4
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Dos and the '&' symbol

    The other standard method is to precede the ampersand & with the carat symbol ^, giving in your case Qual ^& Certification
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •