1@echo off
2
3rem  Copyright Beman Dawes 2011
4rem  Distributed under to the Boost Software License, Version 1.0
5rem  See http://www.boost.org/LICENSE_1_0.txt
6
7if not $%1==$ goto ok
8:error
9echo Usage: backup target-directory-path
10goto done
11
12:ok
13mkdir %1\boost\filesystem 2>nul
14mkdir %1\libs\filesystem 2>nul
15
16set BOOST_CURRENT_ROOT=.
17:loop
18if exist %BOOST_CURRENT_ROOT%\boost-build.jam goto loopend
19set BOOST_CURRENT_ROOT=..\%BOOST_CURRENT_ROOT%
20goto loop
21:loopend
22
23xcopy /exclude:exclude.txt /y /d /k /r %BOOST_CURRENT_ROOT%\boost\filesystem.hpp %1\boost
24xcopy /exclude:exclude.txt /y /d /k /s /r %BOOST_CURRENT_ROOT%\boost\filesystem %1\boost\filesystem
25xcopy /exclude:exclude.txt /y /d /k /s /r %BOOST_CURRENT_ROOT%\libs\filesystem %1\libs\filesystem
26
27:done
28