PC Review


Reply
 
 
Howard
Guest
Posts: n/a
 
      7th Aug 2006
I need to write a script that copy any folder that begins with the letter a
from c:\temp to d:\temp2

please help
thanks
howard


 
Reply With Quote
 
 
 
 
billious
Guest
Posts: n/a
 
      7th Aug 2006

"Howard" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I need to write a script that copy any folder that begins with the letter a
>from c:\temp to d:\temp2
>
> please help
> thanks
> howard


[1]@echo off
[2]md d:\temp2 >nul 2>nul
[3]for /f %%i in ( ' dir /a:d /b c:\temp\a* ' ) do md d:\temp2\"%%i"&cd
"%%i"&xcopy /s/e . d:\temp2\"%%i">nul&cd ..

There are 3 lines to the script. Each has been prefixed by [number] for
identification. The lines may be displayed wrapped. You would need to rejoin
them to re-create a working script.

The spaces around the single quotes in [3] are for clarity and are not
required. The single-quotes ARE required.

NT+ batch techniques at alt.msdos.batch.nt





 
Reply With Quote
 
Howard
Guest
Posts: n/a
 
      7th Aug 2006
Thanks
"billious" <(E-Mail Removed)> wrote in message
news:44d7284c$0$23729$(E-Mail Removed)...
>
> "Howard" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>I need to write a script that copy any folder that begins with the letter
>>a from c:\temp to d:\temp2
>>
>> please help
>> thanks
>> howard

>
> [1]@echo off
> [2]md d:\temp2 >nul 2>nul
> [3]for /f %%i in ( ' dir /a:d /b c:\temp\a* ' ) do md d:\temp2\"%%i"&cd
> "%%i"&xcopy /s/e . d:\temp2\"%%i">nul&cd ..
>
> There are 3 lines to the script. Each has been prefixed by [number] for
> identification. The lines may be displayed wrapped. You would need to
> rejoin them to re-create a working script.
>
> The spaces around the single quotes in [3] are for clarity and are not
> required. The single-quotes ARE required.
>
> NT+ batch techniques at alt.msdos.batch.nt
>
>
>
>
>



 
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



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:27 AM.