nice

-----Original Message-----
From: Ben Scott [mailto:mailvor...@gmail.com] 
Sent: Tuesday, December 20, 2011 11:37 AM
To: NT System Admin Issues
Subject: Re: Recursive File Copy?

On Tue, Dec 20, 2011 at 12:34 PM, Ben Scott <mailvor...@gmail.com> wrote:
> On Tue, Dec 20, 2011 at 12:00 PM, Sam Cayze <sca...@gmail.com> wrote:
>> Need to replace file.jpg with a new version of file.jpg across about 
>> 100 directories.
>
> FOR /R "d:\top" %i IN (file.jpg) DO COPY "d:\other\new.jpg" "%i"

  Whoops.  Note to self: Test first, then post.  ;-)  Try this:

FOR /R "d:\top" %i IN (file.jpg) DO IF EXIST "%i" COPY /Y "d:\other\new.jpg" 
"%i"

-- Ben

~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ 
<http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

Reply via email to