sharing AlbumPlayer database
Having used the wonderful AlbumPlayer for my PC Jukebox - I now had the problem of running the database on two machines - how to keep it up to date?!
Then Jan from the albumplayer forums got in touch suggesting I use an MS DOS Batch file to copy the files over! Great idea - and so simple!!
I’ve now got the files all working - so thought I’d post them here for others to use - should they so wish to!
I decided the best way to approach this would be to call a batch file which will copy the userdata folder when I shut down windows - that way I can be sure all my updates will be transferred. The problem is, I don’t want to copy this data EVERY time windows shuts down - so I made use of a nifty program called [PsShutdown (freeware). This can be called from a batch file AFTER I have copied the files. Here’s what I have now…
These little tools now mean that with no manual copying, I can ensure the quality of my albumplayer jukebox. If you’ve any comments, thoughts, or ways I could improve the process, I’d love to hear them!!
Then Jan from the albumplayer forums got in touch suggesting I use an MS DOS Batch file to copy the files over! Great idea - and so simple!!
I’ve now got the files all working - so thought I’d post them here for others to use - should they so wish to!
I decided the best way to approach this would be to call a batch file which will copy the userdata folder when I shut down windows - that way I can be sure all my updates will be transferred. The problem is, I don’t want to copy this data EVERY time windows shuts down - so I made use of a nifty program called [PsShutdown (freeware). This can be called from a batch file AFTER I have copied the files. Here’s what I have now…
- Create a batch file called “to_shared.bat” with the following code:
:: TRANSFER FROM LOCAL TO SHARED @echo off echo =========================== echo Matt's PC JukeBox Sync Tool echo =========================== echo. :: COPY FROM LOCAL TO SHARED DEVICE echo Copying Jukebox folder from source to shared... echo. echo ** Please do not close this window - it will close automatically ** xcopy "c:\program files\albumplayer\userdata\*.*" "z:\music\userdata\" /e /q /y
- Next I have a batch file which will be called on my “Jukebox PC” when I want to start AlbumPlayer. This will simply copy the userdata folder from the shared directory and automatically overwrite the database on the local machine. It will then automatically start AlbumPlayer. This ensures that each time the jukebox software is loaded, it uses the most recent database! Paste the following code (Assuming you have the default installation directory)
:: FILE TO LOAD ALBUM PLAYER @echo off echo =========================== echo Matt's PC JukeBox Tool echo =========================== echo. :: ASSIGN DRIVE LETTER (it may not have reconnected at start up) Assigning drive letters... net use Z: \\192.168.0.10\share echo. ::COPY THE CONTENTS FROM SHARED DRIVETO THE LOCAL DRIVE echo Copying Jukebox folder from source... xcopy z:\music\UserData\*.* "c:\program files\albumplayer\userdata\" /e /q /y echo. :: START ALBUM PLAYER (default touchscreen mode) echo Starting AlbumPlayer... "C:\Program Files\AlbumPlayer\AlbumPlayer.exe" -touchscreen
- Next assuming you’ve downloaded the PsShutdown tool, I created a batch file called “shutdown_windows.bat”. This will call the batch file in #1 above THEN once that has completed it will call the PsShutdown tool and close windows. Paste the following code:
@echo off call c:\sync\to_shared.bat wait c:\shutdown\psshutdown.exe -m "Shutting down the PC" -c
These little tools now mean that with no manual copying, I can ensure the quality of my albumplayer jukebox. If you’ve any comments, thoughts, or ways I could improve the process, I’d love to hear them!!