Tutorial How to Quickly Get a List of All Your ABC Files [WINDOWS]

Discussion in 'Starbound Modding' started by Sniper_x002, Oct 9, 2015.

  1. Sniper_x002

    Sniper_x002 Phantasmal Quasar

    (If this is in the wrong section, sorry. I am using this section because I thought it would fit here, this is primarily used for getting abc files if you are the author of a songpack).

    Notice: This method is for songpack authors who have many songs and normally it would take a long time to put them all on one document/post.
    I use this method on my pack every update, it takes a minimal amount of time to do so.

    What you will get.
    You will get a ".txt" file containing every single ABC file from whatever directory you want. I will also teach you how to quickly remove the file extensions from the list. You can also use this to easily get a list of new ABC files for an update in your music pack.

    How to do it.
    There are two ways to do this. First is the manual way (requires more work), second I will show you how to make a script to get this process done a lot faster.

    Manual:
    Find the directory you want to get a list of songs from. Shift+Right Click the folder that contains the songs, and select the "Open command window here" option. Next, in CMD, type in
    Code:
     dir /b > 1.txt 
    Look inside the folder now, and you will find the 1.txt with a list of all the files. Be sure to remove the "1.txt" from the list (It includes itself in the list).

    Scripted:
    This will let you get files from the main folder with the "total"(latest) files, and from a folder which has files you will post in a changelog (new).
    Create a text document and put the following code in it, then edit the lines starting with "dir" The first set of quotations on each dir is where the songs are, and the second set is where the text file will go.
    Note: Replace the dir values as appropriate. REM means comment, so no need to edit those. DO NOT leave a space inbetween your directory and the "\*.abc" or "\x.txt".
    Code:
    @echo off
    title Gather ABC 1.1
    echo     Gather ABC 1.1
    echo.
    GOTO start
    
    :start
    echo Latest Release        1
    echo Latest Unrelease    2
    echo Exit            3
    echo.
    set /p choice="Choose an option: "
    if '%Choice%'=='1' goto :gatherlatest
    if '%Choice%'=='2' goto :gather
    if '%Choice%'=='3' goto :end
    
    :gatherlatest
    echo Attempting to gather latest abc files . . .
    rem Replace with your complete songpack.
    dir "REPLACE WITH WHERE YOUR SONGS ARE\*.abc" /b > "REPLACE WITH WHERE THE FILE WILL GO\latest.txt"
    echo Finished.
    echo.
    pause
    cls
    echo.
    GOTO start
    
    :gather
    echo Attempting to gather beta abc files . . .
    rem Replace with your beta directory of songs.
    dir "REPLACE WITH WHERE YOUR SONGS ARE\*.abc" /b > "REPLACE WITH WHERE THE FILE WILL GO\new.txt"
    echo Finished.
    echo.
    pause
    cls
    echo.
    GOTO start
    
    :end
    exit
    
    

    Complete Example:
    Code:
    @echo off
    title Gather ABC 1.1
    echo     Gather ABC 1.1
    echo.
    GOTO start
    
    :start
    echo Latest Release        1
    echo Latest Unrelease    2
    echo Exit            3
    echo.
    set /p choice="Choose an option: "
    if '%Choice%'=='1' goto :gatherlatest
    if '%Choice%'=='2' goto :gather
    if '%Choice%'=='3' goto :end
    
    :gatherlatest
    echo Attempting to gather latest abc files . . .
    rem Replace with your complete songpack.
    dir "C:\Songs\*.abc" /b > "C:\List\latest.txt"
    echo Finished.
    echo.
    pause
    cls
    echo.
    GOTO start
    
    :gather
    echo Attempting to gather beta abc files . . .
    rem Replace with your beta directory of songs.
    dir "C:\New Songs\*.abc" /b > "C:\List\new.txt"
    echo Finished.
    echo.
    pause
    cls
    echo.
    GOTO start
    
    :end
    exit
    

    Next rename the txt file to .bat and you should be able to run it.

    How to remove the .abc extensions from the list.
    Open the file you made with the songs in it with notepad. On the toolbar, go to "Edit" and then "Replace". In the first box type in .abc and leave the second box empty. Hit replace all.

    The attachment is my bat file, as an example if you can't figure it out. If you still don't understand, leave a comment and I will try to help you solve your problem.

    ~Sniper_x002
     

    Attached Files:

    Last edited: Oct 9, 2015
    L3W and The | Suit like this.
  2. LocoTacos

    LocoTacos Orbital Explorer

    Does this work for creating background music for starbound or does it put music for instruments?
     
  3. Sniper_x002

    Sniper_x002 Phantasmal Quasar

    ABC Files, so instruments.
     
  4. LocoTacos

    LocoTacos Orbital Explorer

    Do you possibly know how to change background music instead of instruments?
     
  5. Sniper_x002

    Sniper_x002 Phantasmal Quasar

    I really don't have any idea. If I had to guess, it would be unpacking packed.pak with the assets_unpacker.exe (both found in Starbound's installation). Then you could see the music from the files & possibly replace them & make a mod out of it.
     

Share This Page