# Save

This statement is used to save modifications to files. This statement is the only statement has access to all loaded files, (ie. not hidden), as opposed to only those which are selected. The following are exceptions where you can only save the files being processed. ie. the Save all/selected files option is ignored.

- When executing grouped.
- When executing via a Load & Run statement.
- When executing a Run statement where you have enabled track variable testing to determine which files are processed.

When Save all files is specified, files ignored by an Ignore Files or a Constrain Execution to a Single File statement will be processed. If you are running in the UI, the option will not process hidden files.

Once files are saved you will have lost the ability to revert to the initial state. You can however stil revert to a saved editing state. While you are testing actions it is a good idea to leave the Save statement out of the action.

When linked files are saved, this statement will automatically tell the linked Apple application to refresh its metadata. Depending on your Preferences - Apple Apps settings, some metadata such as ratings, play counts, etc. may automatically be exported.

Yate typically only saves files when they have been modified. If no options are set, files will only be saved if modified. The following options are available:

Save files always
  Files are always saved regardless as to whether they have been modified. If you are doing a batch run to clean your tags you may want to always save your files to force a clean write of the tags. This will ensure the selected ID3 specification is used for mp3 files and will adjust any out-of-spec issues that have been identified in a file. Free space may or may not be reduced depending on the settings in Preferences - Audio.
Save file with non standard tag containers
  This option will force the saving of files containing non standard tag containers even if the files are not modified. It will force the saving of MP3 files with an ID3V1 or an APE tag and FLAC and APE files with ID3 tags. When the files are saved the non standard containers will be removed.
Remove free space if greater than the audio padding size
  Via Preferences - Audio - Remove free space you can force the removal of free space above a specified amount every time a file is saved. When this option is set, the Remove free space setting is ignored. This allows the action statement more granularity. When set and the only if the file is being saved option is not set, a file will always be saved if it has free space in excess of the current padding size. The excess space will be removed. If the only if the file is being saved option is set, the save will not be forced. ie. free space will only be removed if the file is saved for different reasons. Note that you can override the default padding amount by the Preferences statement.
Remove leading audio padding
  Some mp3 files have leading padding. This is extra space before the start of the audio stream. This is rarely placed in the file intentionally but may have been caused by how the audio was captured. Typically this extra data is benign. However, If you have files which are not playing correctly or which cannot be fingerprinted, removing the leading padding may fix the issue. We do not like messing with the audio stream. Only do this if for some reason you feel that the audio track is not behaving correctly.
Complete remove all tags
  As the name implies all tags are removed. Tags which have been configured to be written each time a file is saved will not be written. Note that for all audio formats with the exception of MPEG-4, OGG and Opus, the object encapsulating the tags is removed. In FLAC/OGG/Opus files the vendor identification (typically mapped to Encode BY) is removed (FLAC) or emptied (OGG/Opus). In MPEG-4 files, free space in the tagging area greater than the free space padding setting will be removed. This setting does not automatically update the editing state as is done by File>Save Selected Files>Completely Remove All Tags.