• Please review our updated Terms and Rules here

XCOPY backup

Mike_Z

Veteran Member
Joined
Dec 1, 2013
Messages
1,713
Location
Near Milwaukee Wisconsin
I've been attempting to backup a hard drive on a 486DX computer to another hard drive using XCOPY. I'm using DOS 6.22. After a few attempts and some reading I found that DOS 6.22 XCOPY will not copy hidden or system files. I have seen that some people will use ATTRIB to remove those attributes. But I was wondering how I could return that status to those files?

Then I saw that FreeDOS XCOPY has some extra switches to allow copying hidden and system files. I tried this

A:\ XCOPY D:\ C:\ /m /e /h /y

This seemed to work but then encountered the file IO.SYS and I got the error, 'write access denied'. Does this mean the file was read from the D: drive, but could not write to the C: drive?

I've been horsing around with this for a couple days and so far have not been able to do a complete backup of my hard drive. Any suggestions? Thanks for the help, Mike
 
"This seemed to work but then encountered the file IO.SYS and I got the error, 'write access denied'. Does this mean the file was read from the D: drive, but could not write to the C: drive?"

Sounds like there was a hidden, read-only io.sys already on the C: drive that xcopy refused to overwrite. I'd use DIR C:\ /A:H /S to find the hidden files, then ATTRIB -S -H -R C:\IO.SYS to allow it to be overwritten.
 
I've been attempting to backup a hard drive on a 486DX computer to another hard drive using XCOPY. I'm using DOS 6.22. After a few attempts and some reading I found that DOS 6.22 XCOPY will not copy hidden or system files. I have seen that some people will use ATTRIB to remove those attributes. But I was wondering how I could return that status to those files?

Then I saw that FreeDOS XCOPY has some extra switches to allow copying hidden and system files. I tried this

A:\ XCOPY D:\ C:\ /m /e /h /y

This seemed to work but then encountered the file IO.SYS and I got the error, 'write access denied'. Does this mean the file was read from the D: drive, but could not write to the C: drive?

I've been horsing around with this for a couple days and so far have not been able to do a complete backup of my hard drive. Any suggestions? Thanks for the help, Mike
Try this:

Backup syntax​

MS-DOS 2.x - 5.x syntax​

BACKUP [Source:\Path\File name] [Target:] [/s] [/m] [/a] [/d:date] [/t:time] [/f:size] [/L:LogDrive:\Path\Log]
Source:\Path\File nameThe source, path, and file name of the location of the file that you want to backup.
Target:The target drive for the backup file.
/sMakes a backup of all files, directories, and subdirectories in the specified source location.
/mBackup all files that have changed since the last backup.
/aAdds a new backup file to existing backups instead of overwriting them.
/d:dateBackup files that were created or modified since the date specified.
/t:timeBackup files that were created or modified after this time.
/f:sizeCreate backup files in a specific size so they can be saved to an external storage such as a floppy disk drive.
/L:LogDrive:\Path\LogCreates a log of the backup and specify the location of where the log is to be saved.

Backup examples​

backup c:\work\*.* d: /s
The example above would create a backup of all the files and subdirectories in the working directory and save the backup to the d: drive.
 
XCOPY in the 16-bit DOS mode is quite limited. The 32-bit version in Windows has quite a bit more capability. I suspect that you were copying IO.SYS over an existing one, hence the write violation. You could use ATTRIB to change the system/read only/hidden attribute on IO.SYS before copying and get around that.
 
OK, as I understand it, I should remove the attributes of the target files. Then when the XCOPY works the new files will overwrite the target files and restore the attributes as before. Thanks, I'll give it a try, Mike
 
I use XXCOPY to do my backups. It has a huge number of parameters to fine-tune what and how to copy. the shortcut

XXCOPY D:\ C:\ /BACKUP

copy the content of the D: drive into the C: drive. with /CLONE it will do a full mirror, deleting extra files in C: that are not in the D: drive.
 
Well, I tried to find all the hidden files and remove the attributes, but each time I missed one, XCOPY would stop and just give up. Then the next time I ran XCOPY it would miss a directory. So I just erased the C: drive and then did XCOPY, this worked. But.... I think I'm battling another problem. I think my HDD controller is failing. I'm going to let it cool down and try again. Thanks for the help, Mike
 
Turns out that the ribbon cable between the controller and the HDD was intermittant. I tried using XCOPY again. I first formatted the backup drive (which by the way was a CF card), then removed the attributes of the system files. This using XCOPY all the files were transferred. The only problem I had was that the WIndows 3.11 swap file was corrupt. That was not a problem in that Windows could repair it. I don't know why that happened but, I'm good, Thanks for the help, Mike
 
Back
Top