Erase Output Files

• May 4, 2020 - 10:39

I would like to have an option in which I will be able to erase all output files in a directory. These files would be all audio files and the PDF files. The advantage for such an option is that you do not backup exported files in general.
Here is a plainer list of files which should be deleted by this feature


Deleting files is not MuseScore's job, use your Operating System's means for that, like Explorer on Windows, Finder on Mac. Also you can configure your Backup to ignore certain files or file types

In addition, nothing guarantees you that files of such a type in a directory even are exported output files, they might just as well be the actual origin of the score in some situations.

File management is not MuseScore's job

In reply to by jeetee

Thank you for your reply. You should know why I ask this question. I work in LaTeX as well for other reasons, of course and in WinEdt you have the Option "Erase Output Files" where you are able to erase every output file that is not necessary. You get many auxiliary files if you compile a tex-file.
Musescore is totally a different kettle of fish and thanks for your advice. I reckon you

Attachment Size
Erase Output Files in LATEX.jpg 58.2 KB

In reply to by wolframhuette

I get such an option making sense for intermediary files. My compiler environment for example indeed offers a clean option to wipe out all intermediary files it generates whilst building my source code and turning it then finally into something executable.
By default that command does not erase the end result though, only the in-between (one could argue even "temporary") files.

MuseScore doesn't have such files. Exporting to a given file format is a deliberate end user choice with that file format being the end result. There are no "non-necessary" file being created, so there are none to be removed either.

If your broader workflow however somehow generates files using MuseScore as intermediary files to feed to different programs which then generate the desired end result; then I'd advise to add some script into your workflow that does exactly what you mean. As in this situation, only you know which files are to be considered not necessary.

It's not obvious that deleting files is not the job of an application like Musescore. Someone mentioned IDEs. Microsoft Visual Studio allows you to choose -- to delete a source file from the project abstraction, or from both that and disk. In Eclipse, if you delete a java file that's in the project directory, it disappears from both the project and disk.

Not saying Musescore should do that. I like it the way it is. And it probably helps protect inexperienced people.

In reply to by Jojo-Schmitz

Except that the plugin interface doesn't really offer directory and file management capabilities (such as deleting a file). Therefor it would have to resort to system console commands, which are of course OS/environment specific.
When all the plugin does is calling an OS script, I always wonder about the additional value of the plugin (likely the ease of calling that script). But the actual work then is still done in the underlying scripting for the OS.

In reply to by MikeN

I mentioned IDE's to show you that it is an entirely different use case. IDE's often have a project view, which doubles/acts as a kind of file manager within the project. To directly counter your Eclipse argument, I've used the CDT version quite often and deleting a file from a project can delete the underlying file on the OS, but this is a configurable option there.

The closest thing MuseScore has to such a "project file" would be the Parts of a score, which filewise are embedded in the main score file. And indeed, for parts, MuseScore does offer you to add/rename/remove them.

The point is that a MIDI/MusicXML/PDF-file within the score directory doesn't equal "an output file". For very many users those are the input files and you don't want to go and erase them. Similarly an image file could both be an output file or an input file to the score. And for transcribers by ear, that mp3/wav/audio file you would expect to be an output file from the score is the effective source of their input.

In reply to by jeetee

Well, if in a given directory there is a 'scorefile.mscz' and a 'scorefile.mp3`or 'scorefile.pdf', and the latter is newer than the former, it likely is the result of an export and can get regenerated any time.
Even more so for those backup file, '.scorefile.mscz,'.
Still it is the user to decide whether and which of those to remove.

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