Tech Off Thread

3 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

xcopy not working properly

Back to Forum: Tech Off
  • User profile image
    xCirusX

    Ok... I've been up all night trying to figure this out...

    For some reason I can't get the 'xcopy' command to copy all files from one directory to another. It is only copying *.bat's and nothing else...

    Here is what I wrote:
    xcopy /y /v /r C:\Files\*.* G:\files\*.*

    and I also tried this:

    xcopy /i /s /e /k /y /r C:\Files\*.* G:\Files\*.*


    I'm pretty sure I've done some thing wrong... but I can't figure it out.
    It's for use for a backup/restore batch file I'm making.


    Please Help me
    and Thanks in advance

  • User profile image
    phreaks

    xCirusX wrote:
    Ok... I've been up all night trying to figure this out...

    For some reason I can't get the 'xcopy' command to copy all files from one directory to another. It is only copying *.bat's and nothing else...

    Here is what I wrote:
    xcopy /y /v /r C:\Files\*.* G:\files\*.*

    and I also tried this:

    xcopy /i /s /e /k /y /r C:\Files\*.* G:\Files\*.*


    I'm pretty sure I've done some thing wrong... but I can't figure it out.
    It's for use for a backup/restore batch file I'm making.


    Please Help me
    and Thanks in advance


    That should work, but you don't need to specify the wildcard.

    xcopy "C:\files" "d:\files"  /y /v /r
    xcopy /y /v /r c:\files d:\files
    xcopy  /y /v /r c:\files\*.* d:\files\*.*

    ======= Result ===========
    C:\files\Aggregate Allocations.xls
    C:\files\AllocationPercentages.xml
    C:\files\Book1.xls
    C:\files\CAB-SCSF.chm
    C:\files\export.xls
    C:\files\FITA.mdb
    C:\files\Import.xls
    C:\files\mockdata.xml
    C:\files\mockdata.xml.bak
    C:\files\myxml.xml
    C:\files\report.pdf
    C:\files\stats.txt
    C:\files\WINFILE.EXE
    13 File(s) copied


    ======================


    those All worked for me

  • User profile image
    xCirusX

    Hey, thanks a lot... I finally figured out what was wrong... Some of the files I had in the other directories were system files and the sort...
    Thanks for the help tho!

    Another real quick question tho, How can I make the format command completely automated? I've done it before, but don't remember how...


    Thanks again for the quick response:D

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.