copy by file type but with folders

K

Keith G Hicks

I recently ripped much of my CD collection. I have 2 formats of each file in
each CD's folder. For example:

FOLDER: PopRock
SubFolder: Pink Floyd_DarkSideOfTheMoon
01 - Pink Floyd - Dark Side of the Moon - Speak To
Me-Breathe.m4a
01 - Pink Floyd - Dark Side of the Moon - Speak To
Me-Breathe.mp3
02 - Pink Floyd - Dark Side of the Moon - On The Run.m4a
02 - Pink Floyd - Dark Side of the Moon - On The Run.mp3
03 - Pink Floyd - Dark Side of the Moon - Time.m4a
03 - Pink Floyd - Dark Side of the Moon - Time.mp3
etc.
SubFolder: PinkFloyd_Animals
and then the tracks for that CD

I need to copy ONLY the mp3 files over to my mp3 player as my player doesn't
run m4a files. But I am NOT going to copy one folder at a time and select
only the mp3 files. I have a lot of music. I would ideal like to drag my
entire PopRock folder from my HDD to my player keeping the folder structure
intact but not have it copy the m4a files. I just need the mp3 files.

Does anyone know of a way to do this? I'm guessing it cannot be done with
Windows Explorer itself (without writing code to do it and if I have to
write an app for that I guess I'm stuck). Maybe there's a 3rd party tool
that can dot his. I've looked at a couple but none so far do the job that I
can see. Any suggestions will be appreciated.

NOTE: I don't want to copy ALL the files and then delete the m4a's as that's
very time consuming. I also thougth of zipping everything up and then
deleteing the m4a's from the archive and then unzipping to the player. That
seems pretty slow too. I'd also rather not make a big copy of the entire
structure on my HDD and then delete the m4a's from there. I'm looking for a
way to filter the copy or a tool that will do the job.

Thanks,

Keith
 
P

Pegasus [MVP]

Keith G Hicks said:
I recently ripped much of my CD collection. I have 2 formats of each file
in each CD's folder. For example:

FOLDER: PopRock
SubFolder: Pink Floyd_DarkSideOfTheMoon
01 - Pink Floyd - Dark Side of the Moon - Speak To
Me-Breathe.m4a
01 - Pink Floyd - Dark Side of the Moon - Speak To
Me-Breathe.mp3
02 - Pink Floyd - Dark Side of the Moon - On The Run.m4a
02 - Pink Floyd - Dark Side of the Moon - On The Run.mp3
03 - Pink Floyd - Dark Side of the Moon - Time.m4a
03 - Pink Floyd - Dark Side of the Moon - Time.mp3
etc.
SubFolder: PinkFloyd_Animals
and then the tracks for that CD

I need to copy ONLY the mp3 files over to my mp3 player as my player
doesn't run m4a files. But I am NOT going to copy one folder at a time and
select only the mp3 files. I have a lot of music. I would ideal like to
drag my entire PopRock folder from my HDD to my player keeping the folder
structure intact but not have it copy the m4a files. I just need the mp3
files.

Does anyone know of a way to do this? I'm guessing it cannot be done with
Windows Explorer itself (without writing code to do it and if I have to
write an app for that I guess I'm stuck). Maybe there's a 3rd party tool
that can dot his. I've looked at a couple but none so far do the job that
I can see. Any suggestions will be appreciated.

NOTE: I don't want to copy ALL the files and then delete the m4a's as
that's very time consuming. I also thougth of zipping everything up and
then deleteing the m4a's from the archive and then unzipping to the
player. That seems pretty slow too. I'd also rather not make a big copy of
the entire structure on my HDD and then delete the m4a's from there. I'm
looking for a way to filter the copy or a tool that will do the job.

Thanks,

Keith

If you don't want to do it on a folder by folder basis then you can do it
with a batch file. Here is how it's done:
1. Click Start/Run
2. Type this command:
notepad c:\CopyFiles.bat
3. Click OK.
4. Allow for the file to be created when prompted.
5. Copy & paste the following lines into this notepad:
@echo off
set source=c:\Documents and Settings\Keith\My Music\
set target=X:\
xcopy /s "%source%*.mp3" "%target%
pause
6. Adjust the second and third line to match your environment.
Be careful to use the same type of slashes as I used! Note
that source and target *must* have a trailing backslash.
7. Save & close the file.
8. Using Windows Explorer, double-click c:\CopyFiles.bat.
9. Watch the action.
 
K

Keith G Hicks

Could file name length cause any problems? It seems to run fine and then it
halts when I hit a folder of classical music that has pretty long file
names. For example, one track if you include the path information has a file
name of 255 hcaracters. Classical music that's autotagged by the ripper and
then named based on tags tends to have long names. I usually have to edit
them down a bit because some are even too long for windows to deal with.
 
P

Pegasus [MVP]

Keith G Hicks said:
Could file name length cause any problems? It seems to run fine and then
it halts when I hit a folder of classical music that has pretty long file
names. For example, one track if you include the path information has a
file name of 255 hcaracters. Classical music that's autotagged by the
ripper and then named based on tags tends to have long names. I usually
have to edit them down a bit because some are even too long for windows to
deal with.

Most Windows tools will refuse to touch files whose combined file+folder
name exceeds 260 characters. I am aware of two exceptions: ntbackup.exe and
robocopy.exe.
 
K

Keith G Hicks

Okay. Most of my files are short enought shouldn't be a prob ... have to do
the other ones manually I guess. Thanks for the help.
 
T

Twayne

In
Keith G Hicks said:
I recently ripped much of my CD collection. I have 2 formats of each
file in each CD's folder. For example:

FOLDER: PopRock
SubFolder: Pink Floyd_DarkSideOfTheMoon
01 - Pink Floyd - Dark Side of the Moon - Speak To
Me-Breathe.m4a
01 - Pink Floyd - Dark Side of the Moon - Speak To
Me-Breathe.mp3
02 - Pink Floyd - Dark Side of the Moon - On The Run.m4a
02 - Pink Floyd - Dark Side of the Moon - On The Run.mp3
03 - Pink Floyd - Dark Side of the Moon - Time.m4a
03 - Pink Floyd - Dark Side of the Moon - Time.mp3
etc.
SubFolder: PinkFloyd_Animals
and then the tracks for that CD

I need to copy ONLY the mp3 files over to my mp3 player as my player
doesn't run m4a files. But I am NOT going to copy one folder at a
time and select only the mp3 files. I have a lot of music. I would
ideal like to drag my entire PopRock folder from my HDD to my player
keeping the folder structure intact but not have it copy the m4a
files. I just need the mp3 files.
Does anyone know of a way to do this? I'm guessing it cannot be done
with Windows Explorer itself (without writing code to do it and if I
have to write an app for that I guess I'm stuck). Maybe there's a 3rd
party tool that can dot his. I've looked at a couple but none so far
do the job that I can see. Any suggestions will be appreciated.

NOTE: I don't want to copy ALL the files and then delete the m4a's as
that's very time consuming. I also thougth of zipping everything up
and then deleteing the m4a's from the archive and then unzipping to
the player. That seems pretty slow too. I'd also rather not make a
big copy of the entire structure on my HDD and then delete the m4a's
from there. I'm looking for a way to filter the copy or a tool that
will do the job.
Thanks,

Keith

Search for *.mp3 in that folder heirarchy. Then copy the find results to
where you want them. Done. The command prompt makes it even easier with a
copy *.mp3 to <destination> command.
 
K

Keith G Hicks

Thanks, but not done. That puts ALL the mp3 files from many subfolders into
one folder. AFAIK (unless there's some odd setting that does otherwise) that
doesn't maintain the directory structure at the target location. If you have
10 subfolders under one folder and you search the main folder for mp3's and
then copy all the results into another different folder, you end up with all
your files in one folder sans the subfolders. Pegasus' method does the job
quite nicely.
 
P

Pegasus [MVP]

in message
Thanks for that Pegasus, v. handy.

Just one thing:

then it halts when I hit a folder of classical music that has pretty
long file names.

The problem was more likely having spaces in the filenames, you need
to surround the xcopy arguments with quotes to handle them. This is my
version, which can be placed in your %PATH% and then called anywhere
from the command line:

(CopyFiletypeWithDirs.bat)

Code:
--------------------

REM example usage: CopyFiletypeWithDirs *.mp3 ..\MyMP3Directory

@echo off
echo.
echo - Copying all %1's with full directory structure to %2: -
echo.
xcopy /s "*.%1" "%2" /I
echo.
pause
_gl

You are referring to a post that is now 8 months old and therefore a little
stale.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top