INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Converting a whole directory structure from one format to another  (Read 1552 times)

nymaestro

  • Recent member
  • *
  • Posts: 19

I need a way in Media Center to take a whole directory (say C:\WAVMUSIC) and convert it to another directory (say C:\MP3MUSIC).  After the conversion, both directories will have the same structure (beneath the initial director).  The only difference would be that the file C:\WAVMUSIC\subdir1\subdir2\track.wav would be C:\MP3MUSIC\subdir1\subdir2\track.mp3.

I need an automated way to do this since I have about 5000 tracks to copy/convert into the new structure.

Please help me!!!

Thanks,

David
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Converting a whole directory structure from one format to another
« Reply #1 on: May 20, 2006, 01:23:52 pm »

That is easy to accomplish with MC, but you didn't mention how you would like to your library be after the conversion. Would you like to have both formats available or perhaps have separate libraries for them?

Also, it would be good to know if the "subdir1" and "subdir2" folders are always based on certain library fields or if they are something that cannot be mass reproduced from the library data.

The most basic approach would be to convert all files to mp3 without moving them or updating the database (these are converter options). After that the mp3 files can be imported to the same or another library (select only mp3 in the import options) and moved with the Find and Replace tool. Select the files e.g. in "Recently imported" and use these Find and Replace options:
Tick only: Filename (path) , Find What: C:\WAVMUSIC\ , Replace: C:\MP3MUSIC\
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

nymaestro

  • Recent member
  • *
  • Posts: 19
Re: Converting a whole directory structure from one format to another
« Reply #2 on: May 20, 2006, 04:36:28 pm »

That is easy to accomplish with MC, but you didn't mention how you would like to your library be after the conversion. Would you like to have both formats available or perhaps have separate libraries for them?
[/color]

I would like two separate libraries, one in one structure (starting with C:\WAVMUSIC in WAV format) and one in another (starting with C:\MP3MUSIC in MP3 format).  The main purpose of using Media Center to do this is to embed the tags into the mp3 files during the conversion.

Also, it would be good to know if the "subdir1" and "subdir2" folders are always based on certain library fields or if they are something that cannot be mass reproduced from the library data.
[/color]

Yes--subdir1 and subdir2 are named based upon predefined tags.  Please note that at the begining of the process, only C:\WAVMUSIC exists.  I need the process to create C:\MP3MUSIC with the identical directory tree as C:\WAVMUSIC as part of the conversion.

The most basic approach would be to convert all files to mp3 without moving them or updating the database (these are converter options). After that the mp3 files can be imported to the same or another library (select only mp3 in the import options) and moved with the Find and Replace tool. Select the files e.g. in "Recently imported" and use these Find and Replace options:
Tick only: Filename (path) , Find What: C:\WAVMUSIC\ , Replace: C:\MP3MUSIC\

This does sound possible, but it does not create the directory structure for the MP3 directory tree at the end.  It is important for the system I am going to use with the resulting MP3 files that they do not co-mingle with the WAV files.  I guess I could copy the whole thing to a separate directory and then delete all of the WAV files, but I was looking for something more elegant than that....

Thanks for your help on this!!!

David
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Converting a whole directory structure from one format to another
« Reply #3 on: May 20, 2006, 05:39:13 pm »

[/color]...  it does not create the directory structure for the MP3 directory tree at the end.

Not at the end, but already in the first conversion.

E.g. "C:\WAVMUSIC\subdir1\subdir2\track.wav" would be converted to "C:\WAVMUSIC\subdir1\subdir2\track.mp3" and the resulting mp3 file would have tags based on the library data.

The Find and Replace step would change only the "C:\WAVMUSIC" part of the path so the end result would be "C:\MP3MUSIC\subdir1\subdir2\track.mp3" This step is very fast because the physical files are not moved from one HD to another. The wav and mp3 files would be in the same folders only for a short while.

However, since you like to have separate libraries you could use a cloned copy of the current library (Library Manager has an option for cloning). After making the new cloned library convert the files with the "Update database" option enabled and use the "Find and Replace" tool directly after that.

Since the wave files are not moved or deleted the first library remains intact. Just take care that you don't select the "Send original file to the recycle bin" conversion option.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

NickM

  • Citizen of the Universe
  • *****
  • Posts: 630
  • Simplicity isn't always best, but it's easy to fix
Re: Converting a whole directory structure from one format to another
« Reply #4 on: May 21, 2006, 09:02:41 am »

I keep my music files in the same structure as you are requesting.  The only difference is that I use APE rather than WAV.

Converting from APE to MP3 is a two step process (which happens transparently), the APE first being converted to WAV, then re-converted to MP3.  However, I wish to retain the additional files in each album directory, as well as embedding the cover art and tags in the resulting MP3 files.

So, I just copy the whole directory \\server\ape_1 to \\server\mp3_1.  Then, using a separate library, import from \\server\mp3_1.  This step is to check that I have the correct tags written to the APE files.  Then select the files and convert, sending original file to the bin and updating the library.

At the end of the day, I have \\server\ape_1 to 20 with \\server\mp3_1 to 20 ( each with a 100 CD's - just for easy of storage ) and two librarys.  The APE library I use for playback, the MP3 one, I use to sync to iPods.

nick 
Logged
Pages: [1]   Go Up