xcopy question

Discussion in 'AutoCAD' started by Dr. After, Nov 17, 2004.

  1. Dr. After

    Dr. After Guest

    Is there a way to set multiple "source"s for the xcopy command? Not
    subdirectories, but actual different directories.
     
    Dr. After, Nov 17, 2004
    #1
  2. Dr. After

    Dr. After Guest

    *Fieldguy* typed them thar words:

    | use a batch file

    That is what I got... One with a script like this:

    xcopy C:\Temp C:\BackUp /s /v /c /i /r /k /y

    But I can only use one source. Is there a way to run more then one xcopy in
    the same batch file?
     
    Dr. After, Nov 17, 2004
    #2
  3. Dr. After

    Fieldguy Guest

    use a batch file
     
    Fieldguy, Nov 17, 2004
    #3
  4. Dr. After

    Fieldguy Guest

    yes
    <mybackupbatch.bat>
    xcopy C:\Temp C:\BackUp /s /v /c /i /r /k /y
    xcopy C:\nextdir C:\BackUp /s /v /c /i /r /k /y
    xcopy C:\andthenextdir C:\BackUp /s /v /c /i /r /k /y
    <end of bat>

    is this what u were After Dr.?

    sorry - couldn't resist
     
    Fieldguy, Nov 17, 2004
    #4
  5. Dr. After

    Dr. After Guest

    *Fieldguy* typed them thar words:

    | is this what u were After Dr.?

    brilliant! hehehe...

    As for the suggested script, I tried that already with no avail. but this
    is the second suggestion of said script, so let me go poke at it again and
    see if I can get her running!
     
    Dr. After, Nov 17, 2004
    #5
  6. Dr. After

    Dr. After Guest

    *Fieldguy* typed these words:

    | it works for me (XP Pro SP1.something) running from a dos window
    | (start->run cmd)

    So you can type all that in at once and it will run both commands? I will
    still need it to run from the *.bat file since I am setting this up to run
    as a scheduled task. Can you try it as a batch file?
     
    Dr. After, Nov 17, 2004
    #6
  7. Dr. After

    Fieldguy Guest

    it works for me (XP Pro SP1.something) running from a dos window (start->run
    cmd)
     
    Fieldguy, Nov 17, 2004
    #7
  8. Dr. After

    liftedaxis Guest

    almost as a footnote, robocopy has far more capability and is much faster than xcopy.

    --Jeremiah
     
    liftedaxis, Nov 18, 2004
    #8
  9. Dr. After

    Fieldguy Guest

    I replied with an attachment but I guess that is not allowed.

    Type it into an ASCII file with a .BAT extension. You can use notepad but
    make sure the files gets saved as All Files and a .BAT extension, not .TXT
    and not .BAT.TXT. Better still, use EDIT from the dos window.

    <save below to drafter.bat>
    rem save this file (drafter.bat) to c:\windows\temp
    rem
    rem copy and change the following line as many times as required
    rem
    xcopy C:\Temp C:\BackUp /s /v /c /i /r /k /y
    rem
    rem
    rem after edit and save, goto dos window
    rem change dir to c:\windows\temp>
    rem
    rem drafter <enter>
    rem
    <save above>

    This is all OT Dr. I am willing to help you through this, but not here.
    Email to fgcservices at yahoo dot com if you need more help.
     
    Fieldguy, Nov 18, 2004
    #9
  10. Dr. After

    Dr. After Guest

    *Fieldguy* typed them thar words:

    | This is all OT Dr. I am willing to help you through this, but not
    | here. Email to fgcservices at yahoo dot com if you need more help.

    does that script include using multiple sources? It seems to me that the
    script you presented is very similar to the one I already wrote in that it
    copys only one source. Earlier you suggested that I could run xcopy over
    and over, but I could not get that to work through a batch file. Am I way
    off track here?
     
    Dr. After, Nov 18, 2004
    #10
  11. Dr. After

    Fieldguy Guest

    does that script include using multiple sources?
    No. I thought you would look after that.

    <save below to drafter.bat>
    rem save this file (drafter.bat) to c:\windows\temp
    rem
    rem **** COPY AND CHANGE THE LINE AS MANY TIMES AS REQUIRED ******
    xcopy C:\Temp C:\BackUp /s /v /c /i /r /k /y
    xcopy C:\next1 C:\BackUp /s /v /c /i /r /k /y
    xcopy C:\next2 C:\BackUp /s /v /c /i /r /k /y
    xcopy C:\next3 C:\BackUp /s /v /c /i /r /k /y
    xcopy C:\next4 C:\BackUp /s /v /c /i /r /k /y
    rem
    rem
    rem after edit and save, goto dos window
    rem change dir to c:\windows\temp>
    rem
    rem drafter <enter>
    rem
    <save above>

    Thats my last post here Dr. This discussion has to move - OT means OFF
    TOPIC - as in nothing to do with autodesk.autocad.customization.
     
    Fieldguy, Nov 18, 2004
    #11
  12. Dr. After

    Dr. After Guest

    *Fieldguy* typed them thar words:

    || does that script include using multiple sources?
    | No. I thought you would look after that.


    Well then unfortunately it is no different than the original batch file I
    posted in this thread with just another xcopy command. However, like I said
    already I have tried multiple entries of the command xcopy but only the
    first one actually works. Any attempts after the first one fail for some
    reason. Can you get the batch file to work on your computer with multiple
    xcopy commands?

    Also, being that I am trying to back up all the personalized AutoCAD data,
    it is not that off topic, but if you are out of suggestions, I understand.
    I'm stumped as well and think I just need to make multiple BAT files.
    Thanks for the help, though.
     
    Dr. After, Nov 18, 2004
    #12
  13. Dr. After

    Fieldguy Guest

    Also, being that I am trying to back up all the personalized AutoCAD data,
    That's good enough for me. Yes, it works from a dos window in XP. I can
    xcopy multiple root dirs in 1 batch file using multiple xcopy(s), exactly
    like below. Post your multi line xcopy batch file for me.

    xcopy C:\Temp C:\BackUp /s /v /c /i /r /k /y
    xcopy C:\nextdir C:\BackUp /s /v /c /i /r /k /y
    xcopy C:\andthenextdir C:\BackUp /s /v /c /i /r /k /y
     
    Fieldguy, Nov 18, 2004
    #13
  14. Dr. After

    Dr. After Guest

    *Fieldguy* typed them thar words:

    | That's good enough for me. Yes, it works from a dos window in XP. I
    | can xcopy multiple root dirs in 1 batch file using multiple xcopy(s),
    | exactly like below. Post your multi line xcopy batch file for me.

    This is it exactly copied from my BAT file (between the lines)
     
    Dr. After, Nov 18, 2004
    #14
  15. Dr. After

    Fieldguy Guest

    There might be a problem in the Media dir. Does it work by itself? There
    might be access restrictions, or file in use errors. Your realtime A/V
    scanner will be busy here too. Any really big files maybe?
     
    Fieldguy, Nov 18, 2004
    #15
  16. Dr. After

    Dr. After Guest

    *Fieldguy* typed them thar words:

    | There might be a problem in the Media dir. Does it work by itself?
    | There might be access restrictions, or file in use errors. Your
    | realtime A/V scanner will be busy here too. Any really big files
    | maybe?

    No big files, but it worked when I made another temp folder.... In any
    case, it's working now!!!! Oh Happy, Happy, Joy, Joy!!!
     
    Dr. After, Nov 18, 2004
    #16
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.