UCWare.com

Help topics, tutorials and reviews

How to replace Windows XP ntbackup.exe application by a plain text list of files to be copied, and a simple batch file?

Also how to build up a simple and transparent backup script using batch (bat) files.

What we need is:

  1. White list of files and folders to be copied. Folders have to be copied recursively;
  2. Black list (or filter list) of paths that would not be copied (with masks/wildcards);
  3. Batch file to do the work.

It would be great also to have black and white lists created from .bks file produced by ntbackup.exe.

And I have all of this.

  1. I have bks2robo.exe to convert a bks file to a plaint text white+black lists;
  2. _copyex.cmd to do the work;
  3. chkvol.exe and _quik.cmd to automate backup procedure.
The contents of _copyex.cmd follows:
@if "%1"=="" goto help
@if "%2"=="" goto help
@if "%3"=="" goto help

@set target=%3
@set xcopysw=/d /EXCLUDE:%2 /E /V /C /I /G /H /R /K /Y
@rem  /O /X /Q

@echo White list: "%1"; Black list: "%2"; Target: "%target%"
@for /f "eol=; delims=" %%i in (%1) do xcopy "%%~dpnxi" "%target%%%~pnxi" %xcopysw%


:help
@echo "usage: _copyex.cmd <white-list> <black-list> <target-path>"
@goto end

:end

This article is not finished. If you found it helpful, and would like to view/download the rest of the scripts and stuff - please email me at support@ucware.com.

May 15, 2009.
© Artem Kuroptev of UCWare.com, 2009.