Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: How To: Run Foobar From Portable Device (Read 3762 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How To: Run Foobar From Portable Device

Though I was very pleased to see that Foobar now supports relative paths for the media library, I have still been running into difficulty with this feature in that playlists and playback statistics still use absolute paths. I could just change the drive letter every time, but I play my music on many computers and sometimes even the most obscure letters are already taken. I came up with an alternative that doesn't use up a drive letter, and should work on any system where you have administrative privileges.

Step #0: Setup a portable installation of Foobar on your portable hard drive or usb-key, where the media library paths are relative and point to folder on the portable device.

Step #1: Download hstart.exe and place it in Foobar's install directory.

Step #2: Create a batch file called "Run.bat" in your Foobar directory with the following content:
Code: [Select]
hstart.exe "hstart.exe /WAIT /NOCONSOLE ""subst 0: ""%CD:~0,3%"" "" ""hstart /WAIT ""0:\%CD:~3%\foobar2000.exe"" "" ""subst 0: /d"""

Step #3: From now on, run Foobar by running Run.bat instead of calling the foobar2000.exe directly.
Step #4: You will need to update all your playlists to work with the absolute paths provided by this method which now start with "0:\".

Let me know if it works for you or if you see anything that needs fixing (I'm not great with batch files).

Cheers,
Ryan

How To: Run Foobar From Portable Device

Reply #1
The one thing I haven't figured out is how I could go about editing my old playlist files to replace the old drive letter name ('G:\', in my case) with the new one ('0:\') - I have a bazillion old playlists and I really don't want to have to remake them all.

Search and replace in the fpl file just results in an empty playlist when I restart foobar. Am I missing something? Perhaps there is a checksum? Any help would be appreciated.

How To: Run Foobar From Portable Device

Reply #2
I didn't checked the plugin in your scenario, but have you already tried foo_playlist_revive
This is HA. Not the Jerry Springer Show.

How To: Run Foobar From Portable Device

Reply #3
Thanks Robertina, that did the trick. I now have all my old playlists.

Also: For those of you using foo_uie_playlists_dropdown and want your custom icons to be portable, a resource editor (I used Resource Tuner) can change the default icon embedded in the dll to your custom icons so that you don't run into path troubles.

One more thing, I've discovered a side-effect of the method described in my first post: "Open Containing Folder" no longer works (Windows Explorer can't handle non-letter drive letters [which is why 0: isn't visible in "My Computer"]).

Also... opening Foobar via foobar2000.exe instead of Run.bat will reset your playback statistics, so you may want to hide it so that you don't accidentally click it (old habits die hard).

How To: Run Foobar From Portable Device

Reply #4
Here is an easy way to run foorbar portable without renaming drives or changing anything major.
1. add all the files you want (at work) and save the playlist onto your usb device.
you do this by going to File -> Preferences -> Media Library. under Music Folders click Add and select your usb drive (wait until is says monitoring before closing). Next go to  File -> Add Folder and select where your music is stored on the usb. Now go to File -> Save Playlist and call it something like "workplaylist".
When you get home and and try to play the playlist it will not work. You need to repeat this process for your home computer. Now you will have a "workplaylist" and a "homeplaylist"
On your main screen of foorbar click on the main tab and just double click on the playlist you need and all files will play. You should not have any duplicate files so remove any and resave the playlist if neccessary.

How To: Run Foobar From Portable Device

Reply #5
I suppose that would work for a small collection and only two computers, but it would not work on an arbitrary computer nor, I suspect, would it maintain valid playback statistics. Though it would avoid all the shortcomings of my method.

How To: Run Foobar From Portable Device

Reply #6
I suppose that would work for a small collection and only two computers, but it would not work on an arbitrary computer nor, I suspect, would it maintain valid playback statistics. Though it would avoid all the shortcomings of my method.

I have not been using foobar long nor do I know what you are exactly trying to do. you can add as many drives (computers) as you like, and if two of your computers have the same drive name you don't have to worry about that b/c it will play. I have about 40GB I play. I searched for a way to solve my problem and I could not find any. I was just passing what worked for me on.