Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I'm trying to back up several computers that run on a huge network. They are currently on the Windows 3.11 w/DOS 6.2. I can get into Windows without having to log into the network, or end the batch at startup going directly to the C:> prompt. I have to believe there's a DOS command that will copy all types of files to a backup directory. My main objective is to copy all existing files that are located on one drive, but may be embedded within a variety of directories and sub directories. I've tried: (copy *.doc C:\backup /s) but I get the 'ol "invalid switch" error message. I don't want to go into the file manager and search for all files each and every time since I have hundreds to back up. There has to be a way to get a DOS command to search the entire tree of a drive while copying at the same time. I'm open to suggestions. I've thought of Xcopy, but that doesn't seem to be the right logic in this case. I keep forgeting to bring my DOS book to work. Thanks

Hi,
I think your thought about Xcopy is the right one. It must understand /S switch and copy all subdirectories. Use it instead of Copy command in your example and for more information type XCOPY /? at the DOS prompt.
Good luck, Igor M

Hi,
I was off looking for this file and when I got back ,I see you already have an answer.Well so as the reasearch time was not waisted LOL LOL.
The file has been copied an pasted so it will
need a little editing.Hope this will also help you out.
Just change the source and desination.Example
xcopy c:\*.* c:\backup /h /i /r /ycls
@echo off
rem first two back up
rem third restores
xcopy %windir%\*.dat c:\register /h /i /r /y
xcopy %windir%\*.ini c:\register /h /i /r /y
xcopy c:\register %windir% /h /r /yThe /h will copy the hidden files, so there is no need to
change
attributes back and forth. The /i tells xcopy to create
the
target directory if it does not already exist (c:\register
in
this example). The /r overwrites the read only files that
are in
the target directory from previous backups. The /y runs
the
command automatically without intervention.(ignores errors (win95 swap))Note: You could include /m to avoid copying files that
have not
been changed since the last time you ran the batch file..
BUT if
you are using another backup program it may not backup
these
files because the /m parameter turns OFF the archive
attribute..
and your backup program may depend on that flag to know if
a file
has been modified.If you create a file with a text editor and put those two
lines
in it and name it regbat.bat and just run that batch file
every
week or two... then if you have a problem with your
register and
init files you'll have a backup to fix/restore you
important
windows files. The following command would bring them all
back:xcopy c:\register %windir% /h /r /y
Well I guess I should go and cause some trouble on Usenet.......lol lol giggle.
World Library

Have you ever considered a Tape Backup drive, it can back up an entire drive, depending on size. I use an 'Imation' that uses 800mb compressed to 400mb tapes and can be used in DOS as well as Windows 3.1/95.
Worth checking out if you can afford one.

It depends on what lines are the problem, it could be a syntax error [you might have left something out]If you have or know somebody that has Windows 95 CD, there's a DOS help file in ?:\OTHER\OLDMSDOS, it certainly helped me a few times getting devices to work in DOS and loading memory managers, your best bet or buy a book on DOS

Just to follow up, I found a shareware utility that did the job very nicely for me. It's called "XFF" and is found at download.com uder UTILITIES/(DOS specific or the search is too extensive) The error messages I was receiving consisted of two distinct types. "invalid switch" and "unable to perform cyclical command",or something along those lines. I think origianlly I was putting my switch in the wrong order, but since I found this shareware utuility, I didn't have the time to check it out, time constraints. Thanks everyone for your responses.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |