I'm wondering if it's possible to copy only images files from a directory. For example, if source directory has:

a.jpg b.gif c.png d.txt

I want to copy only the images using one command, to get this in the destination directory:

a.jpg b.gif c.png

link|improve this question
2  
i retagged "windows" and "cmd" assuming you're using the CMD terminal on Windows NT/2k/XP/Vista/7. if you're actually using DOS (meaning MS-DOS 6.22 or earlier, or FreeDOS or another DOS variant), please retag with "dos". – quack quixote Apr 15 '10 at 12:35
feedback

1 Answer

up vote 3 down vote accepted

At command prompt:

FOR %X IN (*.png *.jpg *.gif) DO COPY %X Destination

In a .bat or .cmd script:

FOR %%X IN (*.png *.jpg *.gif) DO COPY %%X Destination
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.