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

Author Topic: xcopy and Windows 7  (Read 16705 times)

0 Members and 1 Guest are viewing this topic.

fabricius

    Topic Starter


    Newbie

    • Experience: Familiar
    • OS: Windows 7
    xcopy and Windows 7
    « on: November 04, 2012, 04:41:07 AM »
    I just bought a Samsung Ultrabook with Windows 7 Home Premium. I use Dos batch files to backup my data but these files do not seem to work. I went into the Dos command prompt and tried to use the xcopy command, but I get a reply: xcopy is not a recognized internal or external command... The same goes with robocopy, though both of them should be available in Windows 7. The copy command works, but I need a command that would allow me to copy also subdirectories (switch D) and leave unchanged files alone (switch S).
    What can I do?

    foxidrive



      Specialist
    • Thanked: 268
    • Experience: Experienced
    • OS: Windows 8
    Re: xcopy and Windows 7
    « Reply #1 on: November 04, 2012, 04:45:44 AM »
    Does it have "c:\Windows\System32\xcopy.exe"

    If so then maybe the path is screwed

    Salmon Trout

    • Guest
    Re: xcopy and Windows 7
    « Reply #2 on: November 04, 2012, 05:32:58 AM »
    Your prompt session may not have the necessary Administrator permissions. In Windows 7 If xcopy/robocopy don't work from an elevated command prompt then maybe the account you are using does not have the needed NTFS permisssions for the folder you are copying to or from.

    http://www.sevenforums.com/tutorials/783-elevated-command-prompt.html

    « Last Edit: November 04, 2012, 05:57:41 AM by Salmon Trout »

    foxidrive



      Specialist
    • Thanked: 268
    • Experience: Experienced
    • OS: Windows 8
    Re: xcopy and Windows 7
    « Reply #3 on: November 04, 2012, 06:47:34 AM »
    Salmon Trout: surely the error would be different if it was a permissions issue.


    Salmon Trout

    • Guest
    Re: xcopy and Windows 7
    « Reply #4 on: November 04, 2012, 09:32:57 AM »
    Salmon Trout: surely the error would be different if it was a permissions issue.

    A good point; the OP said he "just bought" the ultrabook; if it is brand new you would expect the PATH system variable to be still set to the default and therefore find xcopy and robocopy. Maybe Fabricious should type PATH at a prompt and tell us what he or she gets? If a new variable, carelessly called %path% is in existence, that will screw things up. Or a rogue program installer could have mangled it.


    « Last Edit: November 04, 2012, 09:44:15 AM by Salmon Trout »

    patio

    • Moderator


    • Genius
    • Maud' Dib
    • Thanked: 1769
      • Yes
    • Experience: Beginner
    • OS: Windows 7
    Re: xcopy and Windows 7
    « Reply #5 on: November 04, 2012, 09:39:41 AM »
    Fabricious are you sure that isn't Win7 Starter ?/ ? ?
    " Anyone who goes to a psychiatrist should have his head examined. "

    rogerk8



      Rookie

      • Experience: Beginner
      • OS: Windows XP
      Re: xcopy and Windows 7
      « Reply #6 on: November 25, 2012, 03:00:25 PM »
      Hi Fabricius!

      I am a newbie at this and do not know much. But I would like to try and help.

      Maybe you get this strange comment "xcopy is not a recognized internal or external command" because you haven't used it correctly (I imagine and hope MS-DOS is properly emulated even in Windows 7)

      I really don't know (runs XP) but I think you should be able to, in the command prompt, run:

      xcopy c: e: /d /s

      if you want to copy all new files (with respect to the residing files in the destination drive, here called e:) from c: to the destination drive, e:

      Using the /d-switch will thus enable copying of new files only

      and

      Using the /s-switch will enable copying of all subdirectories.

      Actually I think I will use this command the next time I want to back-up my music. Because I do not want to wait another two hours for all my 5GB music to be copied and Windows actually sucks at this kind of synchronization.

      MS-DOS rules!  :D

      Best regards, Roger
      « Last Edit: November 25, 2012, 03:28:20 PM by rogerk8 »

      BC_Programmer


        Mastermind
      • Typing is no substitute for thinking.
      • Thanked: 1140
        • Yes
        • Yes
        • BC-Programming.com
      • Certifications: List
      • Computer: Specs
      • Experience: Beginner
      • OS: Windows 11
      Re: xcopy and Windows 7
      « Reply #7 on: November 25, 2012, 03:04:20 PM »
      Fabricious are you sure that isn't Win7 Starter ?/ ? ?

      +1, I'm not 100% sure but it would make sense that Win7 Starter doesn't have Xcopy or RoboCopy installed, and netbooks almost always come with the Starter Edition.
      I was trying to dereference Null Pointers before it was cool.

      rogerk8



        Rookie

        • Experience: Beginner
        • OS: Windows XP
        Re: xcopy and Windows 7
        « Reply #8 on: November 27, 2012, 04:44:59 PM »
        Hi!

        I would like to refrase my command to:

        xcopy c:\path_S e:\folder_D /d /s

        where

        path_S is the path to your folder which you want to copy

        folder_D is the folder you want to create and/or copy to (I think you will be prompted if the folder does not excist)

        /d is the switch that makes all the files that are newer than the files in the destination folder (folder_D) being copied

        /s is the switch that makes all the subdirectories in the source folder (path_S) being copied

        The above destiction is neccesary due to the fact that xcopy cannot copy itself (yields a so called sharing violation).

        Good luck!

        Best regards, Roger
        PS
        If you want to copy to a simple USB-stick, destination drive might differ from e:


        BC_Programmer


          Mastermind
        • Typing is no substitute for thinking.
        • Thanked: 1140
          • Yes
          • Yes
          • BC-Programming.com
        • Certifications: List
        • Computer: Specs
        • Experience: Beginner
        • OS: Windows 11
        Re: xcopy and Windows 7
        « Reply #9 on: November 27, 2012, 04:47:58 PM »
        Personally I ignored your post since it doesn't even come close to addressing the Original Poster's problem.
        I was trying to dereference Null Pointers before it was cool.