I'd change the robocopy line to:

robocopy "\\server\share" "\\destination\share" "%file%" /ZB /R:3


/ZB does a restartable copy then straight copy if unsuccessful
/R:3 sets retries to only 3 times.



On Jan 3, 2008 10:22 AM, Bill Krumel <[EMAIL PROTECTED]> wrote:

>
>  Am I supposed to leave the %file% at the end of the source path?
>
>
>
> I have tried it without the %file% and it copies ALL files from source to
> the destination.  (not just the files named in the textfile.txt)
>
>
>
> I then added it in the %file% at the end of source and get "error 267: the
> directory name is invalid
>
>
>
> Any ideas what I am missing?
>
>
>
> thanks!
>
>
> ---------------------------------------------------------------------------------
>
> @echo off
>
> setlocal
>
>
>
> for /f %%a in (textfile.txt) do set file=%%a& call :COPY
>
>
>
> endlocal
>
> goto :eof
>
>
>
> :COPY
>
>
>
> Echo copying %file%...
>
> robocopy \\server1\data2\%file% \\server1\test
>
>
>
> goto :eof
>
>
>  ------------------------------
>
> *From:* James Rankin [mailto:[EMAIL PROTECTED]
> *Sent:* Thursday, January 03, 2008 9:25 AM
> *To:* NT System Admin Issues
> *Subject:* Re: copy files from destination folder by UNC path to new
> folder
>
>
>
>
> It would be simple enough to....
>
> Bung list of 1000 specific files into a text file
>
> Then use something like this...
>
> @echo off
> setlocal
>
> for /f %%a in (textfile.txt) do set file=%%a& call :COPY
>
> endlocal
> goto :eof
>
> :COPY
>
> Echo copying %file%...
> robocopy \\server\share\%file% \\destination\share /necessary robocopy
> options (such as W: and R:)
> goto :eof
>
> On 03/01/2008, *Bill Krumel* <[EMAIL PROTECTED]> wrote:
>
> I have a folder with a lot of files in it.  (over 10,000)
> I want to copy only a specific list of about 1000 files out
> of this folder to a new folder by UNC path.
>
> Does anyone have good scripts for this?
>
> thanks!
>
>
> ~ Upgrade to Next Generation Antispam/Antivirus with Ninja!    ~
> ~ <http://www.sunbelt-software.com/SunbeltMessagingNinja.cfm >  ~
>
>
>
>
> --
> James Rankin
> Tel: +44 7902 193912
>
>
>
>
>
>
>
>
>
>
>
>

~ Upgrade to Next Generation Antispam/Antivirus with Ninja!    ~
~ <http://www.sunbelt-software.com/SunbeltMessagingNinja.cfm>  ~

Reply via email to