Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
is there a way to make NT back up a folder either to it's self or to a 98 workstation automatically without a Tape system..i was thinking a Batch file but have no clue on how to make one..
thanks

You can try using ROBOCOPY. It's in the NT resource Kit (you can download it from Microsoft). It is a very powerful utility that I use it to copy data from one machine to another. I'll give you two ways to set it up:
1) Setting up ROBOCOPY for automated batch file usage:
You can copy the entire NTreskit into your WINNT folder. Then go into the computer properties - select ->Environment ->System Variables (highlight PATH)-> Then in the last text box [labeled Value:]. The text box should look some thing like this:
%SystemRoot%\system32;%SystemRoot%
At the very end of this string add the following: [ ;C:\WINNT\NTreskit ] -no brackets-. It would look like this:
%SystemRoot%\system32;%SystemRoot%;C:\Winnt\NTreskit
Save the changes and restart your computer. After restart go to the command/DOS prompt and test your configuration. At the prompt type: [ robocopy ]. -no brackets- Robocopy should start and display a list of menu options for robocopy. If robocopy didn't start, go back and double check for spelling errors. With this modification you will able to use ALL of the utilities in the NTreskit just by typing their name at the command prompt. You can then use robocopy in a batch file to automate Backup or Copy files. Below is an example of a batch file.
Robocopy C:\My_Saved_Data F:\Data_Backup
or:
Robocopy C:\My_Saved_Data \\Server1\D\Data_Backup
or:
Robocopy \\Workstation1\C\My_Saved_Data \\Server1\D\WS_User_Data
You can write these as text (.TXT) files and save them as batch files (.BAT) by changing the file name ending (extension) i.e...:
My_Backup.TXT >---changed to ----> My_Backup.BAT
You could go even further and add a line to the Autoexec.BAT to run the backup batch file automatically when you restart.
--------------------------------------------------------------------------------------------------------------------------------
2) You can choose to not automate ROBOCOPY and use it as a stand-alone tool.
Copy the ROBOCOPY files (do a search for any thing called 'robocopy' in the NTreskit (NT resource Kit). Save them in a folder where you can find it again. Open that folder and click on ROBOCOPY.exe to start the utility
-Steve

Ouch, what an extremely difficult solution. Propably very reliable but still difficult.
Easier is to use the good old Xcopy... I think it can be used over a network. Do *not* use xcopy from w95 or DOS, just the one provided with NT. Use as this:
xcopy c:\ d:\backups /s /m (source to destination)
/s /m makes it copy files changed (has got the archive flag) and all subdirectories. Easy and can be used from a batchfile.

I am running robocopy through command schedular and am wondering if you can redirect the log to a file I can store in another file for reference.
Thank you, David

this is the 'template for a robocopy.cmd' file which i wrote for use at work for using robocopy with 'scheduled tasks'.
don't use the at scheduler.
I you follow this batch file and write one similarly for your own needs then your scheduler will do what you want.
I hope you understand the following : it may take you some time to get the word wrap correct. e-mail me for a reply attaching the robocopy.cmd file m8 if it helps.
@ECHO OFF
REM -------------------------------------------------------------------------------
REM ROBOCOPY v 1.54 : Robust File Copy for Windows NT : by kevina@microsoft.com
REM -------------------------------------------------------------------------------
REM
REM Usage : ROBOCOPY source destination [file [file]...] [options]
REM
REM source : Source Directory (drive:\path or \\server\share\path).
REM destination : Destination Dir (drive:\path or \\server\share\path).
REM file : File(s) to copy (names/wildcards - default is "*.*").
REM
REM options : /S : copy Subdirectories, but not empty ones.
REM /E : copy subdirectories, including Empty ones.
REM
REM /T : Timestamp all destination files, including skipped files.
REM
REM /R:n : number of Retries on failed copies - default is 1 million.
REM /W:n : Wait time between retries - default is 30 seconds.
REM
REM /REG : Save /R:n and /W:n in the Registry as default settings.
REM
REM /X : report all eXtra files, not just those selected.
REM /V : produce Verbose output, showing skipped files.
REM /L : List only - don't copy, timestamp or delete any files.
REM
REM /A+:[R][A][S][H] : add the given Attributes to copied files.
REM /A-:[R][A][S][H] : remove the given Attributes from copied files.
REM
REM /XA:[R][A][S][H] : eXclude files with any of the given Attributes
REM /A : copy only files with the Archive attribute set.
REM /M : like /A, but remove Archive attribute from source files.
REM
REM /XF file [file]... : eXclude Files matching given names/paths/wildcards.
REM /XD dirs [dirs]... : eXclude Directories matching given names/paths.
REM
REM /XC | /XN | /XO : eXclude Changed | Newer | Older files.
REM /XX | /XL : eXclude eXtra | Lonely files and dirs.
REM /IS : Include Same files.
REM
REM /ETA : show Estimated Time of Arrival of copied files.
REM /MOVE : Move files and dirs (delete from source after copying).
REM /PURGE : delete dest files/dirs that no longer exist in source.
REM
REM Batch File Programmed By Norman Cave-Browne-Cave "DATE PROGRAMMED"
rem
rem default blank template : Remember to save as a *.cmd file.:START
ECHO.
ECHO . ROBOCOPY "pzp" To "pzp" And Create A Report File...
ECHO.
ECHO .
ECHO.
ECHO . Starting Process...
ECHO.GOTO BEGIN
:RERUN
ECHO.
ECHO . Re-Starting Process...
ECHO.GOTO BEGIN
:BEGIN
ECHO.
ECHO . Archive Old Report To a Log File...
ECHO.
ECHO.
ECHO. >> \\server\share\pzp.Txt
ECHO ############################################################################### >> \\server\share\pzp.Txt
ECHO ############################################################################### >> \\server\share\pzp.Txt
ECHO. >> \\server\share\pzp.Txt
DATE /T >> \\server\share\pzp.Txt
ECHO. >> \\server\share\pzp.Txt
ECHO +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ >> \\server\share\pzp.Txt
ECHO. >> \\server\share\pzp.Txt
TIME /T >> \\server\share\pzp.Txt
ECHO. >> \\server\share\pzp.Txt
ECHO ############################################################################### >> \\server\share\pzp.Txt
ECHO ############################################################################### >> \\server\share\pzp.Txt
ECHO. >> \\server\share\pzp.Txt
TYPE \\server\share\pzp.Txt >> \\server\share\pzp.LogECHO.
ECHO . Copy Now In Progress - Do Not Close This Window...
ECHO.
ECHO . > \\server\share\pzp.Txt
ECHO.CALL \\server\share\ROBOCOPY \\server\share \\server\share /E /R:3 /W:3 /X /V /XF PAGEFILE.SYS /XD RECYCLER RECYCLED >> \\server\share\pzp.Txt
ECHO.
ECHO . Copy Finished...
ECHO.ECHO.
ECHO . Display Archive Log...
ECHO.START NOTEPAD \\server\share\pzp.Log
ECHO.
ECHO . Display Current Report...
ECHO.START NOTEPAD \\server\share\pzp.Txt
ECHO.
ECHO . Finished...
ECHO.ECHO.
ECHO . Hit The "Any Key" To Re-Run This Process ELSE Hit "Ctrl + C" To Exit...
ECHO.rem ECHO - This Pause Can Be Removed So That This Process Can Run 'Forever' Using 'RERUN' ...
rem PAUSE > NUL
rem ECHO - This command file is called 4 times a day - noon + 6pm + midnight + 6am so 'RERUN' not needed.
rem ECHO - A shortcut is included on the desktop to run on demand + to edit the syntax.rem GOTO RERUN
:END
EXIT

![]() |
NT network DOS boot disk.
|
Page Fault
|

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