Deepak Keynes
Deepak Keynes

Reputation: 2329

How to copy specific files from one folder to another from the command prompt

I have a large folder of pictures (thousands), and I have a long list of files, by exact file name, that I need to copy to another folder using Windows commands, through cmd prompt only. I use Windows 7.

I want to know if there is a way I can select several specific files from this folder, by name, and copy them to another folder, using the terminal, without copying them individually?.

I know I can do it with xcopy but i want to copy specific types of files only say 'jpeg','bmp',etc.

Upvotes: 5

Views: 92052

Answers (3)

bp3
bp3

Reputation: 245

copy c:\scr\*.jpg c:\dst
copy c:\src\*.bmp c:\dst

Upvotes: 0

user6613600
user6613600

Reputation:

Something like:

xcopy /s "c:\source\*.jpeg" "c:\destination\"

should do the trick. Additionally, if you type xcopy /?, you should get the documentation. (you can replace .jpeg with whatever file extension you want.

The information on the page Microsoft DOS xcopy command provides considerably more information and guidance.

Upvotes: 1

mrid
mrid

Reputation: 5794

Try using

xcopy /d /y /s "\Your Image Folder\*.jpg" "C:\Users\%username%\Desktop\Master Image Folder\" 

Also you can simply use

copy *.<extension> <other folder>

For example :

copy C:\Users\desktop\*.jpg D:\backup

will copy all files with extension .jpg from path C:\Users\desktop\ to D:\backup\

Upvotes: 8

Related Questions