Copying a directory tree (but only necessary files) ?

M

Mbene Ovambo

Occasionally I want to copy a complete, huge directory to another drive.

The number of files which are changed/new/deleted compared to the last "backup" is rather small (<5%).
So copying the whole file is a rather waste of resources and time consuming.
Copying only of new and replacing modified files is desired as well as deletion of not longer
existing files/dirs.

The numerous "synchronize"-Tools are not suitable because they are designed to
update the source directory as well. Moreover they oftentimes do not delete files+dirs in the
target directory which are not existing in the source directory.

Furthermore I want to have the option to exclude certain directories.
When I e.g. entered the two lines

D:\proj1\
\log\

into a parameter file and pass this parameter file to the copy-tool all files and directories which
match the two patterns above should be excluded from copying.

Is there a simple and easy-to-use-utility for this purpose?

XCOPY does not offer all feature I mentioned above as far as I know.

Mbene
 
M

Mikhail Zhilin

You can try xxcopy program, www.xxcopy.com

Not all the commands are shown in the documentation, that comes in zip-archive
with the program itself: the full set you can find at that site, too.

So, the command to synchronize destination folder (say, folder2) with source
folder (say, folder1) with all the subfolders is:

xxcopy clone /yy <drive1>:\<path1>\folder1\*.* <drive2>:\<path2>\folder2\

(that is one long line with 4 spaces as separators, and with trailing back
slash). Only the newer files and subfolders, including files which do not exist
in folder2, will be transferred, and all the files and subfolders in folder2,
which do not exist in folder1 more, will be deleted.

--
Mikhail Zhilin
http://www.aha.ru/~mwz
Sorry, no technical support by e-mail.
Please reply to the newsgroups only.
======
 
G

george

Mbene Ovambo said:
Occasionally I want to copy a complete, huge directory to another drive.

The number of files which are changed/new/deleted compared to the last
"backup" is rather small (<5%).
So copying the whole file is a rather waste of resources and time
consuming.
Copying only of new and replacing modified files is desired as well as
deletion of not longer
existing files/dirs.

The numerous "synchronize"-Tools are not suitable because they are
designed to
update the source directory as well. Moreover they oftentimes do not
delete files+dirs in the
target directory which are not existing in the source directory.

Furthermore I want to have the option to exclude certain directories.
When I e.g. entered the two lines

D:\proj1\
\log\

into a parameter file and pass this parameter file to the copy-tool all
files and directories which
match the two patterns above should be excluded from copying.

Is there a simple and easy-to-use-utility for this purpose?

XCOPY does not offer all feature I mentioned above as far as I know.

Mbene

Have you checked into Second Copy from www.centered.com?

george
 
J

Jerold Schulman

Occasionally I want to copy a complete, huge directory to another drive.

The number of files which are changed/new/deleted compared to the last "backup" is rather small (<5%).
So copying the whole file is a rather waste of resources and time consuming.
Copying only of new and replacing modified files is desired as well as deletion of not longer
existing files/dirs.

The numerous "synchronize"-Tools are not suitable because they are designed to
update the source directory as well. Moreover they oftentimes do not delete files+dirs in the
target directory which are not existing in the source directory.

Furthermore I want to have the option to exclude certain directories.
When I e.g. entered the two lines

D:\proj1\
\log\

into a parameter file and pass this parameter file to the copy-tool all files and directories which
match the two patterns above should be excluded from copying.

Is there a simple and easy-to-use-utility for this purpose?

XCOPY does not offer all feature I mentioned above as far as I know.

Mbene

RoboCopy, Download from link at tip 6705 in the 'Tips & Tricks' at http://www.jsiinc.com

Use the mirror option with the exlude option.


Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
 
M

Mikhail Zhilin

You can try xxcopy program, www.xxcopy.com

Not all the commands are shown in the documentation, that comes in zip-archive
with the program itself: the full set you can find at that site, too.

So, the command to synchronize destination folder (say, folder2) with source
folder (say, folder1) with all the subfolders is:

xxcopy clone /yy <drive1>:\<path1>\folder1\*.* <drive2>:\<path2>\folder2\

(that is one long line with 4 spaces as separators, and with trailing back
slash). Only the newer files and subfolders, including files which do not exist
in folder2, will be transferred, and all the files and subfolders in folder2,
which do not exist in folder1 more, will be deleted.

--
Mikhail Zhilin
http://www.aha.ru/~mwz
Sorry, no technical support by e-mail.
Please reply to the newsgroups only.
======
 
R

R. C. White

Hi, Mbene.
XCOPY does not offer all feature I mentioned above as far as I know.

In the "DOS" window, type: xcopy /?

This will give you a list of all the parameters available with Xcopy. The
list is so long that the top scrolls off my 25-line screen, but I can add "
xcopy.txt" to put the output into a text file which I can then read in
Notepad.

The /D: parameter lets you limit the copy to recently dated files. The
/Exclude: parameter lets you specify which filename(s) to NOT copy. Some of
the other parameters and switches might let you use Xcopy to do what you
need to do.

RC
 
L

Lanwench [MVP - Exchange]

Mbene said:
Occasionally I want to copy a complete, huge directory to another
drive.

The number of files which are changed/new/deleted compared to the
last "backup" is rather small (<5%). So copying the whole file is a
rather waste of resources and time consuming.
Copying only of new and replacing modified files is desired as well
as deletion of not longer existing files/dirs.

The numerous "synchronize"-Tools are not suitable because they are
designed to
update the source directory as well. Moreover they oftentimes do not
delete files+dirs in the
target directory which are not existing in the source directory.

Furthermore I want to have the option to exclude certain directories.
When I e.g. entered the two lines

D:\proj1\
\log\

into a parameter file and pass this parameter file to the copy-tool
all files and directories which match the two patterns above should
be excluded from copying.

Is there a simple and easy-to-use-utility for this purpose?

XCOPY does not offer all feature I mentioned above as far as I know.

Mbene

I use robocopy and it works fine for this.
 
R

Rock

Mbene said:
Occasionally I want to copy a complete, huge directory to another drive.

The number of files which are changed/new/deleted compared to the last "backup" is rather small (<5%).
So copying the whole file is a rather waste of resources and time consuming.
Copying only of new and replacing modified files is desired as well as deletion of not longer
existing files/dirs.

The numerous "synchronize"-Tools are not suitable because they are designed to
update the source directory as well. Moreover they oftentimes do not delete files+dirs in the
target directory which are not existing in the source directory.

Furthermore I want to have the option to exclude certain directories.
When I e.g. entered the two lines

D:\proj1\
\log\

into a parameter file and pass this parameter file to the copy-tool all files and directories which
match the two patterns above should be excluded from copying.

Is there a simple and easy-to-use-utility for this purpose?

XCOPY does not offer all feature I mentioned above as far as I know.

Mbene

Try Stompsoft's Backup MyPC, http://www.stompsoft.com/bump.html
 
T

Thorsten Matzner

Occasionally I want to copy a complete, huge directory to another drive.

The number of files which are changed/new/deleted compared to the last "backup" is rather small (<5%).
So copying the whole file is a rather waste of resources and time consuming.
Copying only of new and replacing modified files is desired as well as deletion of not longer
existing files/dirs.

I would take a look at XXCopy (http://www.xxcopy.com), which is
somewhat more powerful and better documented then XCOPY which comes
with Windows.
 
S

Steve N.

Mbene said:
Occasionally I want to copy a complete, huge directory to another drive.

The number of files which are changed/new/deleted compared to the last "backup" is rather small (<5%).
So copying the whole file is a rather waste of resources and time consuming.
Copying only of new and replacing modified files is desired as well as deletion of not longer
existing files/dirs.

The numerous "synchronize"-Tools are not suitable because they are designed to
update the source directory as well. Moreover they oftentimes do not delete files+dirs in the
target directory which are not existing in the source directory.

Furthermore I want to have the option to exclude certain directories.
When I e.g. entered the two lines

D:\proj1\
\log\

into a parameter file and pass this parameter file to the copy-tool all files and directories which
match the two patterns above should be excluded from copying.

Is there a simple and easy-to-use-utility for this purpose?

XCOPY does not offer all feature I mentioned above as far as I know.

Mbene

At cmd prompt do XCOPY /?

Look at the /M and /EXCLUDE switches.

Steve
 
R

Richard Goh

Look at using the "briefcase" to synchronize the files to the new directory.
This copies only the files that have changed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top