Solved

Xcopy hides my destination file

I did a backup of my data drive(G: ), and the backed up files are now hidden on the destination disk.

First I created a new folder (called "BACKUP_FILM")on the destination disk(Q: ). Then I used the XCOPY command to copy my data from the source disk:

xcopy G:\ Q:\BACKUP_FILM /D /E /C /R /H /I /K /Y
pause

Some how or another, the Q:\BACKUP_FILM folder becomes hidden. Sure, it's a minor irritant since I can see the hidden files anyway, but does anyone know how to fix this and prevent it from happening?

I found the function 'attrib' but do I need to call this function for each backup?

EXAMPLE:

xcopy G:\ Q:\BACKUP_FILM /D /E /C /R /H /I /K /Y
attrib /d /s -h -s Q:\BACKUP_FILM
pause
9 answers Last reply Best Answer
More about xcopy hides destination file
  1. is this a copy software?
  2. IF THIS IS DVD XCOPY WE CAN'T HELP YOU!
  3. Best answer
    To copy all files from one drive or folder to another in dos I would use ..

    xcopy g:\*.* q:\back_film /e /c /r /k /y

    This will copy everything found on g: to folder keeping original folder structure, ignoring errors, overwriting read-only files while removing attribute and supressing confirmation prompt.

    It's always best to use the short filename, when using dos based commands.
  4. das_stig said:
    To copy all files from one drive or folder to another in dos I would use ..

    xcopy g:\*.* q:\back_film /e /c /r /k /y

    This will copy everything found on g: to folder keeping original folder structure, ignoring errors, overwriting read-only files while removing attribute and supressing confirmation prompt.

    It's always best to use the short filename, when using dos based commands.



    Thx, i'll try it!
  5. Best answer selected by cecd2401.
  6. No, I don't have system files, only data. Thx for your help!
  7. If this is something that you do regularly, you might like to investigate "robocopy". It's a much more robust and versatile version of xcopy that is included with Windows 7.
  8. Ok, i just read a lot about robotcopy, and it is a very powerfull tool. The problem with powerfull tool, is that we have a lot of option. So, if i want to do this with robocopy:

    xcopy g:\*.* q:\backup /e /c /r /k /y


    Can i use :

    robocopy g:\*.* q:\backup /MIR


    What I need is a simple backup of data. Once done, I want to make a backup that selects the file that were changed. I try to understand how to use / copyall and / MIR, but what I did with xcopy seemed good to me.

    Any suggestion of simple option to use with robocopy?
  9. Have a look at this link. It gives a good example script for backing up a server, along with details of all the options.
Ask a new question

Read More

Configuration Backup Command Prompt Windows 7