PC Review


Reply
Thread Tools Rate Thread

Copying a file to multiple folders

 
 
vincent-nyc
Guest
Posts: n/a
 
      15th Oct 2008
Hello,

I need to copy a new text file to everyone's Windows directory under
Documents and Settings folder. How would you write a batch file to
accomplish this task?

Thanks,
Vince
 
Reply With Quote
 
 
 
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      15th Oct 2008

"vincent-nyc" <(E-Mail Removed)> wrote in message
news:0F52AAAA-8802-4E0F-8089-(E-Mail Removed)...
> Hello,
>
> I need to copy a new text file to everyone's Windows directory under
> Documents and Settings folder. How would you write a batch file to
> accomplish this task?
>
> Thanks,
> Vince


This batch file will perform the basic task:
@echo off
for /d %%a in ("c:\documents and settings\*.*") do xcopy /y c:\test.txt
"%%a\Windows\"

You need to add some extra coding if you want to exclude the various system
profile folders that exist next to the user folders.



 
Reply With Quote
 
vincent-nyc
Guest
Posts: n/a
 
      16th Oct 2008
Hi Pegasus,

can you tell me the extra coding that is needed to only copy the file to the
windows directory in their profile folder?

Thanks.



"Pegasus (MVP)" wrote:

>
> "vincent-nyc" <(E-Mail Removed)> wrote in message
> news:0F52AAAA-8802-4E0F-8089-(E-Mail Removed)...
> > Hello,
> >
> > I need to copy a new text file to everyone's Windows directory under
> > Documents and Settings folder. How would you write a batch file to
> > accomplish this task?
> >
> > Thanks,
> > Vince

>
> This batch file will perform the basic task:
> @echo off
> for /d %%a in ("c:\documents and settings\*.*") do xcopy /y c:\test.txt
> "%%a\Windows\"
>
> You need to add some extra coding if you want to exclude the various system
> profile folders that exist next to the user folders.
>
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying multiple folders to PST eckert1961 Microsoft Outlook VBA Programming 2 11th May 2010 08:33 PM
copying a document into multiple folders =?Utf-8?B?SmF6bWluZw==?= Microsoft Word Document Management 1 1st Aug 2005 03:45 PM
Rule - Copying Into Multiple Folders =?Utf-8?B?THlubg==?= Microsoft Outlook Discussion 1 20th Jul 2005 04:53 PM
Copying a file to multiple folders at once/folder redirection Steve Microsoft Windows 2000 1 25th Sep 2003 01:16 PM
Re: Copying folders to multiple destinations Pegasus \(MVP\) Microsoft Windows 2000 0 15th Aug 2003 11:10 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:22 AM.