G+_Tony Dunn Posted April 19, 2015 Share Posted April 19, 2015 I need a solution. I have some mp3 that are in directories 3 or 4 deep. I want to copy them to a new folder in bulk. Just the files. About 80 gig. Windows copy brought the folders also. Tried some copy programs without success. Link to comment Share on other sites More sharing options...
G+_Ben Reese Posted April 19, 2015 Share Posted April 19, 2015 I did this a couple weeks ago with a batch script, but I don't remember exactly what I typed... You should also be able to do it in Windows Explorer using the search in the top right. Type (with the quotes) "*.mp3" and that should find all MP3s in all the sub folders. You can then select all and copy to your desired destination. Link to comment Share on other sites More sharing options...
G+_Tony Dunn Posted April 19, 2015 Author Share Posted April 19, 2015 I tried that and it brought the folders with it Link to comment Share on other sites More sharing options...
G+_Florin Balanescu Posted April 19, 2015 Share Posted April 19, 2015 [win+r] cmd for /r %i in (*.mp3) do copy %~fi \%~nxi for example: for /r c:\music %i in (*.mp3) do copy %~fi d:\mp3s\%~nxi Link to comment Share on other sites More sharing options...
G+_Tony Dunn Posted April 21, 2015 Author Share Posted April 21, 2015 Florin Balanescu Link to comment Share on other sites More sharing options...
G+_Tony Dunn Posted April 21, 2015 Author Share Posted April 21, 2015 Z:music....going to z:raw mp3. What would this look like...I tried various ways with your cmd and could not get it Link to comment Share on other sites More sharing options...
G+_Florin Balanescu Posted April 21, 2015 Share Posted April 21, 2015 for /r z:\music %i in (*.mp3) do copy "%~fi" "z:\raw mp3\%~nxi" Link to comment Share on other sites More sharing options...
G+_Tony Dunn Posted April 21, 2015 Author Share Posted April 21, 2015 Florin Balanescu when I do this it returns cannot find the file specified...but it is checking every file in the directory Link to comment Share on other sites More sharing options...
G+_Ben Reese Posted April 21, 2015 Share Posted April 21, 2015 Does z:\music have the folders with your MP3s in it? I think that would be something like this: For /r z:\music %i in (*.mp3) do copy "%~fi" "z:\raw mp3\~nxi" Here's a full list of the "for" commands options: https://technet.microsoft.com/en-us/library/bb490909.aspx Link to comment Share on other sites More sharing options...
G+_Tony Dunn Posted April 21, 2015 Author Share Posted April 21, 2015 How can I post a photo here Link to comment Share on other sites More sharing options...
G+_Tony Dunn Posted April 21, 2015 Author Share Posted April 21, 2015 yes there are folders under z:music ..ie music\acdc\album\*.mp3 Link to comment Share on other sites More sharing options...
G+_Florin Balanescu Posted April 21, 2015 Share Posted April 21, 2015 do you have a "z:\raw mp3" folder? if not.... mkdir "z:\raw mp3" Link to comment Share on other sites More sharing options...
G+_Tony Dunn Posted April 21, 2015 Author Share Posted April 21, 2015 I do Link to comment Share on other sites More sharing options...
G+_Florin Balanescu Posted April 21, 2015 Share Posted April 21, 2015 you might as well use Total Commander (shareware, free), search for *.mp3 (ALT+F7) then, instead of "Go to file", you should "Feed to listbox" and in the other panel open the destination folder. Then simply select all files from the search results and copy (F5) them to the destination folder. Link to comment Share on other sites More sharing options...
G+_Tony Dunn Posted April 21, 2015 Author Share Posted April 21, 2015 That worked thank you Link to comment Share on other sites More sharing options...
G+_Tony Dunn Posted April 21, 2015 Author Share Posted April 21, 2015 Nope, copied sub directory structure as well Link to comment Share on other sites More sharing options...
G+_Tony Dunn Posted April 21, 2015 Author Share Posted April 21, 2015 I give up Link to comment Share on other sites More sharing options...
G+_Tony Dunn Posted April 21, 2015 Author Share Posted April 21, 2015 Just want to copy mp3 files to a new directory without their legacy subs Link to comment Share on other sites More sharing options...
G+_Ben Reese Posted April 21, 2015 Share Posted April 21, 2015 I'll try some commands when I get to wrong, but I did this very same thing with CSV files a couple weeks ago. Or Yeah... And because "raw mp3" is a subfolder of "music", it will be scanned too. A few other options.... Surely xcopy and robocopy both have this ability. Robocopy also has a gui with checkboxes available. Link to comment Share on other sites More sharing options...
G+_Ben Reese Posted April 22, 2015 Share Posted April 22, 2015 Yeah, this worked for me: For /r z:\music %i in (*.mp3) do copy "%~fi" "z:\raw mp3\~nxi" Well, kinda... I started my command prompt in the folder I wanted to work in and I was using .data files, but it should essentially be exactly like this solution. What are you getting in the command prompt window? On mine, you can see it scroll through all the files as it builds a copy command for each one. If it's doing nothing, make sure you're dealing with MP3s and not WMAs or some other format. Link to comment Share on other sites More sharing options...
G+_Tony Dunn Posted April 22, 2015 Author Share Posted April 22, 2015 Made some progress with your latest effort, now it attempts the copy , but it ask if i want overwrite the file nxi each file it processes. It does not copy any mp3. just builds the file nxi. Link to comment Share on other sites More sharing options...
G+_Tony Dunn Posted April 22, 2015 Author Share Posted April 22, 2015 Took the nxi part off the command and seems to be working now. Link to comment Share on other sites More sharing options...
G+_Ben Reese Posted April 22, 2015 Share Posted April 22, 2015 If it's giving an error about "nxi", I'd guess you missed the %~ in front of it or perhaps capitalized the %I at the beginning (I think it's case sensitive for variables if I remember correctly). Link to comment Share on other sites More sharing options...
G+_Tony Dunn Posted April 23, 2015 Author Share Posted April 23, 2015 For /r z:\music %I in <*.mp3> do copy /y "~fi" "z:\mp3\" This is what I finally got to work. Thank you Ben for all your help. Link to comment Share on other sites More sharing options...
G+_Aye Mossum Posted April 30, 2015 Share Posted April 30, 2015 if I was at a bash prompt, i would find {src_dir} -name '*.mp3' -exec 'cp' '{}' '{dest_dir}' ';' Or I might cp .mp3 */.mp3 //.mp3 *///.mp3 {dest_dir} but you said Windows.... Link to comment Share on other sites More sharing options...
Recommended Posts