Home All Groups Group Topic Archive Search About

Robocopy/xcopy no "INCLUDE" option/flag?

Author
10 May 2007 7:53 PM
g0rdy
I'm trying to use Robocopy or xcopy'd recursive file copy functions to parse
a text file -

the text file would include a list of pathnames to files

There are EXCLUDE arguments but not any INCLUDE that I can find..

The main use for this is to take a text file with a list of pathnames and
copy those files listed, if anyone knows of a means to do this or another
utility i'd like to know!

Thank you for your time!
-gordon

Author
10 May 2007 10:29 PM
Pegasus (MVP)
Show quote Hide quote
"g0rdy" <g0***@discussions.microsoft.com> wrote in message
news:7F8150AB-7EFC-4A18-BBEC-0B6A9DDBBDBA@microsoft.com...
> I'm trying to use Robocopy or xcopy'd recursive file copy functions to
parse
> a text file -
>
> the text file would include a list of pathnames to files
>
> There are EXCLUDE arguments but not any INCLUDE that I can find..
>
> The main use for this is to take a text file with a list of pathnames and
> copy those files listed, if anyone knows of a means to do this or another
> utility i'd like to know!
>
> Thank you for your time!
> -gordon

Try this:

@echo off
for  /F  "tokens=*"  %%*  in (c:\Files.txt)  do  xcopy /y /c /d /h "%%*"
d:\Target\

Bookmark and Share

Post Thread options