Help - Search - Members - Calendar
Full Version: How to relocate library with PlayCount intact?
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Support - (fb2k)
~*McoreD*~
Hi All,

I used to have my music library in D:\Music (temporarily). After some HDD reordering in BIOS, and reinstalling Windows, foobar2000 library is now inaccessible because the music is now in F:\Music.

F:\ is what I want.

I opened up database.fpl to replace D:\ with F:\ but it seems to take quite a while...

I was wondering the proper procedure for relocating library keeping PlayedCount intact.

Searched before posting:
http://www.hydrogenaudio.org/forums/index....elocate+library but surprised at the results, so asking here... smile.gif

Thanks,
McoreD

Edit:

Replacing D:\ to F:\ wasn't a good idea. I had a CRC error and the database.fpl was reset to 0 KiB. I was lucky to have an older RAR backup.

_oao
there's a tool in windows xp that let's you change hard drive letters, i'm not sure about the name because my windows is not in english: "computer manager"(?) which has a "hard drive manager"(?) section?.

i used it to change my second partition letter from F: to D: when i upgraded my laptop with a bigger hard drive in the beginning of year...
Walterrrr
It's probably easier to reimport your library, unless a script could be written to alter foobar's database (namely, the initial path to the files).
Would it be possible to have Foobar apply the playcount values to songs based on tags, rather than files? For example, if the artist, album, date, and title were the same, then it's probably the same song, so why should the play counts be different for a FLAC file that is now replacing an MP3 file?

Also, I sometimes have had to move my files around because I didn't have a consistent repository for all my music. Actually, I still don't, but soon I should. Of course, there's always the possibility of hard drive failure and then I'd be back to square zero.

EDIT: wait a second...
QUOTE(~*McoreD*~ @ Jun 5 2008, 02:03) *

I opened up database.fpl to replace D:\ with F:\ but it seems to take quite a while...

can't you use the "replace" function in notepad?
~*McoreD*~
I just tried with iTunes.

iTunes music folder was configured to D:\Music

After I changed to F:\Music, it updated the whole library database with new paths so I was able to preserve everything. Didn't have to re-import anything.

I guess for now, it is probably easier to re-import the files in foobar2000 and not care about the PlayCounts. I thought there was a way.

The playcounts are in Last.fm as well so Walterrr Last.fm is my solution: for both MP3 and FLAC my played count will be properly incremented.
Walterrrr
did you try notepad's replace function?

Yes, Last.fm is snuggly laugh.gif

I still would like a local solution, I guess. shrug
~*McoreD*~
Hey walter, yeah biggrin.gif

Replacing D:\ to F:\ wasn't a good idea. I had a CRC error and the database.fpl was reset to 0 KiB. I was lucky to have an older RAR backup.
boombaard
Probably better to write the stats to the tags first, then move them.

PS. When I recently did a mass move (of about 10-15gb per batch) audiobooks, about one file in every other directory got 'lost' from the database, although the file entry stays in the database until you do a "check for dead items", at which time it will still refer to the original position, and be deleted from the database.
I've noticed it doesn't happen much if you keep the batches fairly small, so you might need to move a comparable amount of files (2k+ per batch) to confirm that.
kanak
McoreD, other than the change in drive letters, everything else is fine right (no change in directory, etc)?

If this is indeed the case, you can use text tools to export your play counts etc to a text file, and use the 'import from clipboard' to add them back in:

Step 1: Create a playlist with all the files in your library.
Step 2: Use text tools to export all the relevant data delimited by tabs, or some other character (so that you can use Foobar's "format from other fields" option). e.g.:
CODE

%rating%##%play_count%##%last_played%##%first_played%$crlf()

Here i'm using ## to delimit the fields.

Step 3: export to text file. also create an m3u.

Step 4: use notepad to find-replace "d:" with "f:"

Step 5: add m3u back, use properties -> Guess values -> from clipboard. Copy your txt file into clipboard, and use it to obtain data.

Step 6: Playback Statistics -> Import data from tags.

Step 7: Properties -> Remove the play_count (etc) data.


The disadvantage here is that you'll have to retag all your files, but it doesn't take a long time (I've done it on a batch of ~17,000 files).

kompot
Haven't tried the following but I think it should work.

Right click on the whole library (all tracks selected)
File operations -> Move
and replace drive letter/part of the path to anything else
with the $replace() function
~*McoreD*~
kanak & kompot,

Very useful information. I have delicioused it for future reference.

Thanks.
thuan
@kompot: It works fine and simple. Thanks.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.