Batch convert Finale files to MusicXML?

I have slightly over a thousand Finale files scattered all over the place. One of these days, those files will no longer be accessible. Before that happens, I want to be able to convert those files into an accessible form.

It seems to me that the form most likely to be usable is MusicXML. I tried converting a few of my larger Finale files into MusicXML and was able to obtain files that, when loaded into Dorico, gave me scores that would be useful with relatively little tweaking. That’s great!

However, Finale has no way of automatically generating MusicXML from all those scattered files. The closest I can come is to convert all the Finale files in a single folder to MusicXML.

Aha! I thought–this is easy. Just take all those Finale files, copy them into a single folder, batch convert them there, then copy all the resulting MusicXML files back into the original folders. A simple matter of programming.

And in fact, it was simple: Maybe 15 minutes’ work gave me a single folder with copies of my thousand plus Finale files in it. So I launched Finale and set it to work converting all those files to MusicXML.

It failed spectacularly. The problem is that Finale converts a file by opening it in a subwindow, converting it, and then writing the MusicXML–but it doesn’t close the subwindow. That means that Finale starts consuming ever more memory, until it crashes altogether.

So here’s my plea: Can someone who is working on the MakeMusic transition please give us a way to look at what might be a huge folder, find every Finale file therein, convert it to MusicXML, and then, when it’s all done, give us a report about any files that failed to convert?

Being able to–in effect–salvage as much useful information as possible from Finale files would be a great way of gaining confidence that when Finale stops working outright, it will still be possible to have access to the music I’ve written over the years.

1 Like

The good news is you can get a log of all the errors in a conversion. Go to File > MusicXML > Preferences and click “Silence error messages” under Translate Folder to MusicXML. You can then specify a log file to write to the folder that is being converted.

The bad news is that it does close the subwindow, but there is a memory leak somewhere in Finale that I just could not find and fix. I’m sorry about that. It caused us problems too when we converted tens of thousands of files from desktop SmartMusic to web SmartMusic. You’ll want to limit the number of files in a folder to convert at one time. Several hundred usually work fine; several thousand not so much.

5 Likes

At least in recent versions of Finale one can export both folders and their sub-folders to XML. The key I found was to open a blank Default file and then set the parameters and choose a reasonably sized folder (with sub-folders) to have the utility transcribe. As long as I kept the size of the folder(s) reasonable, the process did not take long. I would not try to do all my files at once though.

4 Likes

When I tried it, I was not able to get Finale to export files in subfolders–just files that were directly in the folder that I was trying to export.

Can I ask you to try it again?

It won’t export the files in the subfolders by default. If you go to File > Export > MusicXML Preferences…, you can check the “Include subfolders” box to change that.

3 Likes

Aha! I’ll check that out.

1 Like

Yes, it works. Thanks!

Now I just have to figure out how to avoid converting too much stuff at once.

2 Likes

When moving from Finale to Dorico in 2021 I wrote a FinaleScript to batch export all scores and (extracted) parts as MIDI, PDF and MUSICXML files. The script was run in top level category folders such as Big Band, Chamber Music, Orchestra, then works its way through the individual projects in subfolders.

FinaleScript Source Code Listing

/*
File: Finale Batch Export Scores
Date: June 2021
Subject: Script for exporting all Finale 25 scores and parts as PDF, Midi and MusicXML
*/

// apply the script to all files in the folder and subdirectories
ask source folder
batch process folder
// process subdirectories

/* inspect the score in page view */
execute menu item “Page View”
fit in window

// SET PRINTER AND SCORE PAPER SIZE

// set the score paper size for new pages
execute menu “Document/Page Format/Score”
// type A4 near “Page Size”
// US Letter dimensions
type 2448 near “Width”
type 3168 near “Height”
// A4 dimensions
// type 2381 near “Width”
// type 3368 near “Height”
// A3 dimensions
// type 3366 near “Width”
// type 4761 near “Height”
// drop-down “A3”
Button “OK”

// set the score paper size for the current score
execute menu “Page Layout/Page Size…”
// type A4 near “Page Size”
// US Letter dimensions
type 2448 near “Width”
type 3168 near “Height”
// A4 dimensions
// type 2381 near “Width”
// type 3368 near “Height”
// A3 dimensions
// type 3366 near “Width”
// type 4761 near “Height”
check “All Pages”
// drop-down “A3”
Button “OK”

// REDEFINE THE SCORE LAYOUT
page layout tool
menu item “Redefine Pages/Selected Pages*”
select popup “Current Part or Score” near “Redefine”

// Update page range to include all pages
type 1 near “Page”
type 0 near “Through”
// spacebar
radio button “Left and Right Pages” near “Include:”
button “OK”
// confirm changes popup window
button “OK”

// redefine the pages with the above-selected paper size
// execute menu “Page Layout/Redefine Pages/All Pages of Current Part”
// execute menu “Page Layout/Redefine Pages”
// wait 2
// Button “OK”

// set the printer paper size to A4/A3
execute menu “File/Page Setup”
// type “US Legal” near “Paper Size”
// type “A4” near “Paper Size”
// drop-down “A4”
drop-down “US Letter”
wait 2
type “100%” near “Scale”
// Popup “A4”
button “OK”

// save and append “_A4”

// EXPORT SCORE AS MIDI, MUSICXML AND PDF

// turn off human playback OK
select window “Playback Controls”
choose drop-down “None” near “Style”
// wait 1
execute menu item “Window/Playback Controls”

// export to Midi file and save OK
execute menu “File/Export/MIDI File…”
Button “Save”
// Save as Format 1 MIDI file
Button “OK”

// export to MusicXML file and save OK
execute menu “File/Export/MusicXML…”
Button “Save”

// print and save as PDF OK
execute menu “Print”
check “Fit to page”
// drop-down “A4”
wait 2
drop-down “Save as PDF…”
Button “Save”

// END OF SCRIPT

The script may take hours to complete, and may occasionally stop at any point (for reasons unknown to me), so an a posteriori check on completeness is required (then restart at the appropriate subfolder level). Hopefully this script helps during these days of Finale user hardship. Feel free to use or modify the code ( I have not used the script since 2021). Happier Dorico days lie around the corner. Good luck.

2 Likes

Thanks for sharing this, @frans_absil. Excuse my ignorance, but I assume FinaleScripts are shareable as files? If so, do you want to send me a FinaleScript file, and we could include this in our forthcoming blog post for file conversion?

Is there any need to redefine the Pages?

The end of this post from Michael Good yesterday may shed light on that.

@dspreadbury Done (mail). You, the Dorico team and more experienced forum members are doing a great job welcoming and helping the many Finale users in the transition process. Take care.

2 Likes

@benwiggy In the score category folders there may be both DIN A3 and A4 scores. After finishing a score I do the PDF export as standard procedure. But now I decided to do a mass archiving operation for all source document sizes and therefore included the (A4) Page redefinition step. There is no need do so, and these line in the code may be turned into a comment (//). And, Ben, thanks for your continual invaluable support on this forum.

2 Likes

@Mark_Johnson Thanks for pointing me to this post from @MichaelGood. Indeed it may explain why the script occasionally stops at a random Finale file. But still, the only solution I am aware of is to restart the script from there.

Is there a simpler version that just batch processes PDF’s? I tried the FinaleScript “Batch Save as Graphic” but I can’t get it to work.

::: Bill

This FinaleScript exports just PDFs, works with v25.5:

Batch Process Folder
Graphics tool
Menu item “Export Pages”
Popup “PDF”
Check “all”
Press “OK”
expect to return
Close
End

EDIT
To also process subfolders:

Batch Process Folder and Subfolders
Graphics tool
Menu item “Export Pages”
Popup “PDF”
Check “all”
Press “OK”
expect to return
Close
End

Thanks, Eggsalad. I ended up creating PDF’s a file at a time and found may pieces I forgot I had written.

::: Bill

1 Like

Thank you for providing those scripts, @Eggsalad .

Unfortunately the batch conversion of pdfs doesn’t seem to be working in Finale 27 in Win 10. (It might be ok on Mac.)
It converts one file but requires manual confirmation to save the pdf, and then the script goes into a state where the “start” button on the script button rapidly alternates between the green triangle and pause symbol.

After reading around the Finale support site and forum, I understand that in v27 Finale made all pdf creation go through Microsoft Print to pdf, so I’m wondering if that’s what broke the batch export.

Can anyone shed any light?

Edit: I should have added that the Batch convert to graphic script, does run continuously on multiple files (by default it creates TIFF files) which does suggest that this is a pdf-specific problem.

Hmm.

Those scripts work with Finale 25.5 on Mac Ventura. Unfortunately, I can’t test on Windows.

The command which doesn’t seem to work for you is “expect to return”. If you search for “Batch Save As Graphic” on this manual page, you’ll find the example script on which the above are based, including that command. This documentation is for Finale 27 for Windows, which indicates that it should work with Windows, generically.

When you say it “requires manual confirmation to save the pdf”, do you mean in the “Save PDF File” dialog? I’d like to check if an additional dialog opens for you. For me, the Finale file opens, the “Export Pages” dialog opens, then the “Save PDF File” dialog opens, and that’s it.

Have you tried the Finale forum too?

Having played around in FinaleScript I finally got this script to work:

Batch Process Folder
Graphics tool
Menu item “Export Pages”
Popup “PDF”
Check “all”
Press return
Press return //Press return is required twice
//expect to return
Close
End

Please note:

This script is specific to Finale v.27 on Win10. (I’m using v.27.4.1)
@Eggsalad 's script will likely work on Mac and on earlier versions of Finale on Windows.

I strongly recommend copying the original files to a new folder and experimenting only on the copies.

Before converting to pdf I converted my Finale (2008) files to version 27, using the script Convert folder of Files to the current Finale Format, and made the pdfs from the version 27 files.

The pdf files are created via Microsoft Print to pdf, which has the following limitations:

  • The page size seems to need to be specified in settings first. (My files are all A4, but Microsoft Print to pdf only supports a limited range of sizes.)
  • The exported files are significantly bigger than pdfs exported via 3rd party “printers” such as Adobe Acrobat. (From various posts on the Finale forum, anything from 2x to 8x bigger.)
  • The exported files don’t contain embedded fonts, and there doesn’t appear to be any option to make Microsoft Print to pdf embed them.
1 Like