Automatically Update Music in SAM Broadcaster

One of Winamp’s best features is the ability to scan and update music from designated music folders into your library automatically. This feature is very useful; especially since I’m always updating my music collection and adding music to a “to review” folder. My initial frustration with SAM Broadcaster was its inability to perform this function through its media library. Through some searching and asking on the Spacial Audio forms, I found that in order to replicate Winamp’s feature, I must create a script through SAM’s PAL Scripting functionality. In order to do this I had to use the Rescan procedure and the SUBDIR function. In this post I will show you how to create this script. 

PAL Scripts are text files that contain commands for SAM to run. Scripts are manages through the PAL Script window found in Desktop B. Creating a script is simple, first open notepad (or your favorite text editor) and save a file with any name you would like to use, to make your life easier you may want to save it with the .pal  exentision. In this example you can name the script “SAM Broadcaster Rescan.pal”. Next, in the PAL Script window, click on the “+” and then click on the folder icon to select our script file. You may also want to select “Automatically Start Script” so the script will execute when you first open SAM Broadcaster. After you click the OK button, the script will appear in the PAL Script window. Now we want to edit the script and include the line that will update the music library. Open the script by  double clicking or by using the edit icon (the fourth icon from the left), and an empty window will appear with line numbers along the left hand side. Inside of this window, on line 1, enter the following code: 


You must point SAM to your music directory by replacing the c:music portion of the code. On my system, my music folder is on the G drive in a folder aptly titled ‘music’. My command will look as follows:


If you are running Windows Vista and you use the the default music director for you music, your path would be c:users<your user name>Music. SAM will scan the music folder and all of the sub-folders and automatically add the music files to the music library. If  you place all of your music in one folder, you can replace the SUBDIR command with the DIR command in exactly the same manner:


After placing the command, save the file (by going to File -> Save) then click on the Run button to execute the scripts command. In my experience, this command may cause SAM to be a bit unresponsive when running the script, especially if you have a very large music library. This may cause SAM to lock up for a moment (less than a minute), as this process of adding new music is relatively fast. One option is to separate your music into different sub-folders and run the command over each individual sub-folder.  I organize my music by Genre, here is an example of how this script would look like:

SUBDIR['g:musicAlternative Rap'].Rescan;
SUBDIR['g:musicBig Beat'].Rescan;

If your a bit patient with this script, this added feature through PAL Scripting will alleviate one of the major shortfalls of SAM Broadcaster.

This entry was posted in DJ Tips and tagged , , , , . Bookmark the permalink.

13 Responses to Automatically Update Music in SAM Broadcaster

  1. electron says:

    Could you tell me, how can i writeln the name/path of the added songs?

  2. I don't quite understand, you should be able to, while in the PAL editor, type in the path of the directory where your songs are in. You really don't get a list of songs that are added, nor do you know, the library is just suddenly updated.

  3. Bam says:

    Thank you so much for this! I keep all of my music on an external drive that is constantly plugged in and unplugged, so it changes drive letter often. This gives me an easy way to update my search!

  4. IVAN says:

    Can you please share your scrip with me?I don't know how to make one. I am new using Sam



  5. Daniel says:

    It does nothing 🙁

  6. Sara says:

    I have a LOT of music and am constantly adding to my library, so you can imagine how much I hate having to delete and then re-add all my music over and over. I was looking for a fix for something else when I happened to glance at your article. Although I have a lot of pc experience, my experience of SAM is fairly limited, so I was a bit wary of the dreaded "Pal Scripts".

    I can't believe how straightforward it turned out to be due to your extremely clear and straightforward instructions. Many thanks for taking the trouble to post this.

  7. willem says:

    Hello, is it also possible to directly in the root to search and what is the syntax

  8. Stefan says:

    Dude, you made my day. Simple and good tutorial, works awesomely!

  9. samatha Carson says:

    OK this seems clear for updating the music, BUT what happens if you sort your music in sam. Meaning I place my music in sub folders in sam that match my physical directories. Is it possible to update each one of my sam directories or can you only update the music to one hugh sam directory?

  10. Al says:

    I have Sam Broadcaster 3… I have two questions for you… Trying to add music to my queue, once its loaded in queue I'm trying to play the music and its not working… I have over 1500 songs and its only playing two songs, what can I do? Is there a way that I can save the music to my computer from Sam 3?

    Thanks in advance.

  11. Hodyshoran says:

    Does this not include subfolders autmatically?

  12. Max says:

    excuse me this error:
    Access violation at address 005681BE in module 'SAMBC.exe' Read of address 00000208

  13. mina says:

    come on he is giving us some help… This isn't a good way to treat his kindness for sharing a knowledge with being rude if you dont like it just leave without this rude replies… atleast he know more and got he can share and not blank minded

Leave a Reply

Your email address will not be published. Required fields are marked *