## Move Non Audio Files

This function is used to move non audio files from one or more source folders to other folders. It can also be used to rename non audio files.

This function will not move audio files of types handled by Yate, folders or hidden files.

Note that audio files of types not handled by Yate may be moved.

You can specify specific files or types of files to be moved in the Move files... field by separating the items with slash characters (/). This field is an inclusion list. Non leading and trailing spaces are significant. For example:

> folder.jpg/Cover Art.jpg/png

The above example will move files named folder.jpg, cover Art.jpg and any file with a file type (extension) of png.

When the Move files... field is empty, all non audio types (excluding those mentioned above and those specified as exclusions) will be moved.

Items in the list can be forced to match only file types by starting the item with a period. Items in the list can be forced to match only files by ending the item with a period. Forcing the match type should only be necessary in extreme cases. For example:

> txt./.jpg

The above example will match files named txt and any file with a file type of jpg.

You can also specify a rename pattern for files being moved. This is only valid for fully qualified filenames or folder names. You specify the new name following a : character. For example to rename files named cover.jpg to folder.jpg you would specify the following:

> cover.jpg:folder.jpg

If the source and destination folders are the same, you can use the above construct to rename non audio files in place.

You can specify files and file types that are to be excluded from being moved. Enter the list of exclusions in the Exclude files... field. The field is formatted the same as the Move files... field. Excluding files only makes sense if the extension of the file being excluded was specified in the Move files... field. Excluding file types only makes sense if the Move files... field is empty. For example:

> folder.jpg/cover files.png/pdf

Note that this function ignores alphabetic case when processing files to be moved.

The source and destination folders are obtained in one of three ways:

Folders from variables
  You specify the variable containing the source folder and the variable containing the destination folder. The variables must contain absolute paths (/), paths relative to the home folder (~/) or paths immediately relative to the containing track's path (., .., ./ or ../). You can use the Get Property - Path to Folder function to extract the folder containing a track. If a path references an audio file, the folder containing the audio file will be used. If a path cannot be resolved to be absolute, it is ignored.
Using retained paths
  This specifies that a non empty Retained Path 2 should be the source of the move and a non empty Retained Path 1 should be the destination of the move. These properties are set by the Move statement.
Use original and current folders
  Every track has a current folder and an original folder. The original folder is the folder containing a track when it is first loaded.

For all tracks being manipulated under the current execution mode, a set of source folders and associated destination folders is established. Note that there is at most one destination permitted for any given source folder. If you've done a number of moves of tracks from a single folder to separate destination folders, no files will be moved from that source folder.

Destination folders will be created if they do not exist.

You can specify that you want to move contained subfolders by selecting the Attempt to move subfolders option. A subfolder can be moved if none of its descendents is an audio file. When you are attempting to move subfolders, all subfolders will be processed (unless hidden). When processing a subfolder the inclusion list is ignored, however the exclusion list is still processed. This means that when attempting to move subfolders, all subfolders in a source folder will be processed unless they are explicitly named in the exclusion list. Note that contents of a sub folder are always moved if the subfolder is moved. The inclusion and exclusion lists are ignored for subfolder contents. Note that subfolders cannot be renamed using the : construct unless you have this option selected.

You can specify that you want a source folder to be deleted after a move if it is empty. Check the Delete empty folder option. Additionally if you delete the original folder you can delete an empty parent folder as well by checking the and empty parent option. Note that when the Attempt to move subfolders option is enabled, empty sub folders are moved.

Existing files are always overwritten by this function!

The exact algorithm for determining which files get moved is as follows:

1. If a file starts with a '.', it is a hidden file and is ignored.
2. If a file has the invisible attribute, it is ignored.
3. If a file is an audio type handled by Yate, it is ignored.
4. If the Move files... list is not empty and a file, (not a subfolder), cannot be matched against an item in the Move files... list, the file is ignored. A match can be a full filename match or a file type (extension) match.
5. If a file is matched against an item in the Exclude files... list, it is ignored. A match can be a full filename match or a file type (extension) match.
6. If a file is a folder, and Attempt to move subfolders is not specified, it is ignored. If the subfolder has any audio files as descendents, it is ignored.
7. The file is moved.