Help - Search - Members - Calendar
Full Version: Can I Reset Database on Open Foobar?
Hydrogenaudio Forums > Hosted Forums > foobar2000 > General - (fb2k)
vader897
Hi,
I am putting together a foobar configuration to put on my USB drive. I was wondering if it was possible to set it up so that every time I open foobar the database is empty.

I have fooplaylistclear which takes care of the playlist and am after something similar.

You may be thinking 'why doesnt he just disable to the database.' I still would like the database to exist, it would just make things much easier if everytime I opened it, it was empty to prevent errors as I go from machine to machine.

If there is no way to do this, then I guess this is a plugin request.

PS If you have any other tips for creating a portable foobar, please share them with me.
roentgen
I think that deleting [foobar_dir]\database.fpl would be more than enough
vader897
QUOTE(roentgen @ Jun 14 2006, 03:55) *

I think that deleting [foobar_dir]\database.fpl would be more than enough


but is there a way for this to happen each time I open foobar, or close foobar for that matter.
Just so that each time foobar is opened there is an empty database and playlist.
kjoonlee
You could make database.fpl 0 bytes in size and read-only.
Apo
You could make a little .bat which deletes the database and then starts foobar and open that instead of foobar.
vader897
QUOTE(Apo @ Jun 14 2006, 17:01) *

You could make a little .bat which deletes the database and then starts foobar and open that instead of foobar.




I tried the read only thing. It works except for the popup before I close that tells me it is read only and warns me I will lose changes.

I am really liking the idea of creating the batch file. I also thought that would be the best way to make a relitive shortcut in my USB drive. (relitive shortcut needed as drive letter changes from PC to PC)

I need some help with doing this. I will do some searching around to get as much help as I can but if anyone has any ideas please dont hesitate to post.
david_dl
Uh, how about:

CODE

@echo off
del database.fpl
foobar2000
exit

vader897
This is what I have come up with.

CODE

DEL \PortableFoobar2000\playlists\00000001.fpl
DEL \PortableFoobar2000\playlists\00000002.fpl
DEL \PortableFoobar2000\playlists\00000003.fpl
DEL \PortableFoobar2000\playlists\00000004.fpl
DEL \PortableFoobar2000\playlists\00000005.fpl
DEL \PortableFoobar2000\database.fpl
START \PortableFoobar2000\foobar2000.exe


I found that playlist clear doesnt do the job properly so I had to use the batch to delete the playlists too. Is there a neater way than having what I have, I havent tested it yet but I am guessing that if I close foobar with more than 5 playlists open, then the database wont be empty. I also tried to delete the index.dat file but that causes another playlist to be imported from somewhere as opposed to a blank one.

I am still experimenting.

EDIT: Yay, I fixed it

CODE

@ECHO OFF
DEL \PortableFoobar2000\playlists\*.fpl
DEL \PortableFoobar2000\database.fpl
START \PortableFoobar2000\foobar2000.exe


I know its simple but I hope other beginners can benifit from it too
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.