xcopy command

  • Thread starter Thread starter Tony Young
  • Start date Start date
T

Tony Young

Hi,

I want to copy all of *.cpp and *.h files from a folder tree (with
several levels of subfoloders) to another location. But alll the rest
of files must remain intact. How do I make this happen? I try to run
c:\Windows\system32\cmd.exe. I get a black window, similar to a DOS
window. But the copy and xcopy commands don't have an option that I can
use for this purpose. Could someone help me out? Thanks for any help.

Tony
 
Xcopy Commands
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/xcopy.mspx

--
Carey Frisch
Microsoft MVP
Windows - Shell/User
Microsoft Community Newsgroups
news://msnews.microsoft.com/

---------------------------------------------------------------------------­----------------

:

| Hi,
|
| I want to copy all of *.cpp and *.h files from a folder tree (with
| several levels of subfoloders) to another location. But alll the rest
| of files must remain intact. How do I make this happen? I try to run
| c:\Windows\system32\cmd.exe. I get a black window, similar to a DOS
| window. But the copy and xcopy commands don't have an option that I can
| use for this purpose. Could someone help me out? Thanks for any help.
|
| Tony
 
Tony said:
Hi,

I want to copy all of *.cpp and *.h files from a folder tree (with
several levels of subfoloders) to another location. But alll the rest
of files must remain intact. How do I make this happen? I try to run
c:\Windows\system32\cmd.exe. I get a black window, similar to a DOS
window. But the copy and xcopy commands don't have an option that I
can use for this purpose. Could someone help me out? Thanks for any
help.
Tony

Are you trying to move or copy the files? Xcopy will copy them and leave the
original intact. Move will move them and delete the original.

Kerry
 
If that's the -exact- command you used, you left out a space
after "xcopy". It should be xcopy(space) *.cpp, and possibly
some flags such as s for subdirectories. Maybe you meant:
xcopy -s c:\somefolder\*.cpp?
"xcopy /? will bring up all the switches and a sample commande
line available with xcopy when you're in the command prompt.

Pop
 
Back
Top