Announcement

Collapse
No announcement yet.

Need Help With Batch file xCopy

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

  • Need Help With Batch file xCopy

    I am new to this forum. I need help this is what I have for a batch file...

    xcopy u:\*.* e:\userfiles\ /s /c /h /r /y
    xcopy c:\*.* e:\mail\ /s /c /h /r /y
    xcopy t:\*.* e:\trans\ /s /c /h /r /y


    and the problem is that it only gets some of the directory and files.
    I thought the problem at first was that some of the directorys or files had spaces in them but that doesn't seem to be the case
    I don't know why this is, can someone please help me

    Thanks
    Kris
    Last edited by djturizmo; 16th January 2006, 18:56.

  • #2
    Re: Need Help With Batch file xCopy

    You're trying to copy mapped drives to a local folder.
    Is it possible you do not have permission to access some of the folders that you're trying to target?

    If it's not that you could also try adding /z to your parameters.

    "/Z : Copy files in restartable mode. If the copy is interrupted
    part way through, it will restart if possible. (use on slow networks)"
    Last edited by Gringo; 16th January 2006, 20:03.

    Comment


    • #3
      Re: Need Help With Batch file xCopy

      try this:

      Code:
      xcopy u:\*.* e:\userfiles\ /s /e /v /h  /y
      xcopy c:\*.* e:\mail\ /s /e /v /h /y
      xcopy t:\*.* e:\trans\ /s /e /v /h  /y
      with removing /c you can see if any error occur.

      if you want a more trusted filecopy i would recommend robocopy. is this btw for a backup or?
      Marcel
      Technical Consultant
      Netherlands
      http://www.phetios.com
      http://blog.nessus.nl

      MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
      "No matter how secure, there is always the human factor."

      "Enjoy life today, tomorrow may never come."
      "If you're going through hell, keep going. ~Winston Churchill"

      Comment


      • #4
        Re: Need Help With Batch file xCopy

        The code that was put up there by Marcel doesn't seem to work. The network is very fast here so i don't think that is an issue. It doesn't seem to get inturrupted or error out.

        When i run the batch file it fisrt copies the files that are in the mapped drive u:\ and then it starts to copy the folders, there is a folder for just about every letter in the alphabet and a couple of them name with numbers, but for some reason it starts with B for the folder that it copies.

        I beleive I have full control of the files that are on the storage device (Linksys File/print server) anyone can add delete rename or move any files on this device. I went into properties and changed it on one file so the everyone has full control and didn't make it get copied. So im don't think its a permissions thing.

        I don't know what robocopy is could you please tell me more is it a program or a batch command?

        This is for backup

        I am using windows xp pro

        I am at a loss again.

        Thank you so much for your help!
        Kris
        Last edited by djturizmo; 16th January 2006, 20:56.

        Comment


        • #5
          Re: Need Help With Batch file xCopy

          Ok I now know what robocopy is i have installed it and thats about as far as i can get. If you could help me so that robocopy does this backup That would be awesome.

          Thanks
          Kris

          Comment


          • #6
            Re: Need Help With Batch file xCopy

            Are you trying to copy any open files coz that won't work.
            1 1 was a racehorse.
            2 2 was 1 2.
            1 1 1 1 race 1 day,
            2 2 1 1 2

            Comment


            • #7
              Re: Need Help With Batch file xCopy

              Nope I am positive that no files are open.

              Comment


              • #8
                Re: Need Help With Batch file xCopy

                see the manual of robocopy. There are all the options explained. Also use the logging, which can help you out.

                also see this topic:
                http://forums.petri.com/showthread.php?t=5998&page=2
                Last edited by Dumber; 17th January 2006, 10:42.
                Marcel
                Technical Consultant
                Netherlands
                http://www.phetios.com
                http://blog.nessus.nl

                MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
                "No matter how secure, there is always the human factor."

                "Enjoy life today, tomorrow may never come."
                "If you're going through hell, keep going. ~Winston Churchill"

                Comment

                Working...
                X