Xcopy specified file extension only

Is there a way to use xcopy to just copy files with a certin file extension for example xcopy only .doc files?
Who is Participating?
vico1Connect With a Mentor CIOCommented:
xcopy *.doc  
The Asterix stands for all files. Therefore the above command would copy all files with the extension .doc
Just to add a little more detail to vico1's post above:

here's an example:
xcopy c:\Temp\*.doc c:\Temp2 /I

This command will copy all files ending in doc from the c:\Temp folder into the c:\Temp2 folder.  The /I  (that's a slash "eye") just means that Temp2 is a directory (and not a file).  Just alter the above command to suite the path where you're copying your files from and to.

Post back if you have any questions!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.