Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: using XCOPY when directory has a space in name  (Read 67109 times)

0 Members and 1 Guest are viewing this topic.

Doc16743

    Topic Starter


    Rookie

    using XCOPY when directory has a space in name
    « on: October 23, 2008, 05:35:41 AM »
    I got the "START" command to work when the app name has a space in it, but now having the same problem with XCOPY. The directory I want to copy has a space in it (Ham Radio) and the command fails. The same fix used for START doesn't seem to apply to XCOPY.
    Trying to set up a batch file that will copy this dir and sub-dirs to another drive (XCOPY C:\Ham Radio D:\Ham Radio)

    Thanks in advance!
    Doc

    fireballs



      Apprentice

    • Code:Terminal
    • Thanked: 3
      Re: using XCOPY when directory has a space in name
      « Reply #1 on: October 23, 2008, 06:07:55 AM »
      If you are using DOS/Batch programs with a space in a path then you need to put "" around the path e.g.
      Code: [Select]
      Xcopy /s "c:\ham radio" "D:\Ham radio"
      also the '/s' switch copies all subfolders including empty ones.

      FB
      Next time google it.

      Doc16743

        Topic Starter


        Rookie

        Re: using XCOPY when directory has a space in name
        « Reply #2 on: October 23, 2008, 07:39:03 AM »
        Thanks! I don't think I tried that combination of quotes. Will give it a shot when I get home thisafternoon!


        Doc16743

          Topic Starter


          Rookie

          Re: using XCOPY when directory has a space in name
          « Reply #3 on: October 23, 2008, 01:55:34 PM »
          That did it!

          Thanks again!