1.

Solve : Copy files without copying directories??

Answer»

Here's what I want to do:

I want to copy audio FILES to a microsd card for use on my cellphone, however my cellphone does not SUPPORT subdirectories under the main x:\my_music FOLDER. It NEEDS all the mp3 files directly in the x:\my_music folder with no subdirectories for artist or album.

So I went into my media player and selected the songs that I wanted (about 100) and copied them to a c:\cellphone directory. When it copied, it copied the subfolders for artist and album so it looks like C:\cellphone\artist\album\song.mp3.

I need to get all of the mp3 files out of those subdirectories and into a single folder, and I don't want to do it drag and drop in windows because that would take forever.

How would I go about this?Say this is is where the music is: C:\cellphone\artist\album\
And you want it here: C:\cellphone\

I would go to C:\cellphone\ and press CTRL + F.
This will bring up the Search window. Search for all audio files in that directory and then copy and paste to C:\cellphone\d'oh .. didn't think of that. I don't think i've ever actually used the search feature in explorer.

thanks! Good Luck for /f %a in ('dir /s /b *.mp3') do copy %a x:\my_music /v /y

The /v is to verify and the /y is to by-pass overwrite prompt in the event of duplicate files. It can be ran from the command LINE if you create a batch file you would need to change %a to %%a



Discussion

No Comment Found