Move all files of type to a new folder in windows 7

Solution 1:

Try this command from top level folder where you have mp3 files.

forfiles /M *.mp3 /C "cmd /c move @file C:\music"

Note that if you have files with duplicate names, moving all of them into a single folder is not the right thing to do. It will cause data loss.

There is also a way to move all files matching the criteria inside of the sub directories with the /S flag:

forfiles /S /M *mp3 /C "cmd /c move @files C:\music

This will recursively search through all the folders in your current directory

Reference: Forfiles windows command

Solution 2:

As executed from command line:

for /r %M in (*.mp3) do @if /I "%~dpM" neq "c:\temp\mp3 files\" @echo move /-Y "%M" "c:\temp\mp3 files\"

This simply echoes commands to the screen so it's safe to run and see if it fits your needs. It will start from current directory, so if you want enumerate everything exec it from c:\.
Naming of your destination directory is of course up to you - but make sure if exists! You may also want to put it in a variable, or as batch parameter to avoid typing mistakes. When you're 100% sure output is correct just remove @echo, and then test it again with few files/paths (make sure to include those with spaces and some unusual chars)

Few words of caution:
1. You said you you have dups. I've put /-Y as a safeguard, so moving a file with the same name as already moved will stop this script waiting for you to confirm. You may overwrite this with /Y switch, but you risk overwriting more than you wished for!
2. This is hardly reversible or irreversible (if you have 'false' duplicates - different files with same name) operation. Make a backup before you start!
3. Look what you have before you move - this will give you a list of all of your mp3s, nicely formatted with name, size and directory:
for /r %M in (*.mp3) do @echo "%~nxM", "%~zM", "%~dpM" >>filelist.txt
Use spreadsheet to sort and inspect it.

Notes:
a) In fact you could remove that if part altogether, as moving a file onto itself does noting, but I just find it messy :-)
b) if you want to put it in a batch replace single %with double %%