Batch convert solution

• Feb 1, 2025 - 13:27

Hi guys! I often end up with a lot of Musescore documents that needs to be converted to PDF.
Since the batch convert plugin isn't available for version 4.4 I needed to find a solution.

I'm on MacOS 14.7 and using Musescore 4.4. This is what I ended up up doing:
Writing a simple Apple-script that converts all .mscz in a folder to PDF.
Then I inserted the script in MacOS Automator and was able to save it as an app.

Look at the attached gif. Feel free to use :)

Here's the script:

-- Choose the folder with MuseScore files
set folderPath to POSIX path of (choose folder with prompt "Select the folder with MuseScore files:")

-- Find all .mscz files in the folder using shell
set findCommand to "find " & quoted form of folderPath & " -type f -name '*.mscz'"
set msczFiles to paragraphs of (do shell script findCommand)

-- Get the number of files found
set fileCount to count of msczFiles

-- Initialize counter for converted files
set convertedCount to 0

-- Convert each .mscz file to PDF
repeat with filePath in msczFiles
set outputPath to filePath & ".pdf"

-- Run MuseScore via the command line to export to PDF
do shell script "/usr/local/bin/mscore -o " & quoted form of outputPath & " " & quoted form of filePath
set convertedCount to convertedCount + 1

end repeat

-- Display a final report with "Awesome!" button
display dialog "Conversion complete! " & convertedCount & " files converted." buttons {"Awesome!"} default button 1

Attachment Size
Screenshot.gif 3.32 MB

Do you still have an unanswered question? Please log in first to post your question.