Xcopy hides my destination file

cecd2401

Distinguished
Jan 19, 2011
5
0
18,510
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

 
Solution
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.
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.
 
Solution

cecd2401

Distinguished
Jan 19, 2011
5
0
18,510



Thx, i'll try it!
 

cecd2401

Distinguished
Jan 19, 2011
5
0
18,510
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?
 

TRENDING THREADS