Skip to main content

Delete Source Folder

Delete Source Folder

Deletes the source folder of the original library file.

If Empty

Only delete the source folder if the it is empty.

Include Patterns

Optional, if set only files matching these patterns will be counted to see if the folder is empty. Any of these patterns can match

Top Most Only

When eanbled, only the folder directly containing the file will be deleted, leaving all higher-level folders intact.

For example, if a file is located at /mnt/library/sub/sub2/sub3/file.mkv, only sub3 will be deleted.

When disabled, the deletion process may remove the containing folder and any empty parent directories up to the library path (/mnt/library). Use this option to control how much of the folder structure is cleaned up during deletion.

Example

If working with video files, you may want to delete the source folder only if there are no other video files to process. There maybe some files left in the folder that you do not wish to keep, eg a "nfo" file. So you could set the "Include Patterns" to "^((?!sample).)*.(mkv|mp4|avi|divx|mov|mp(e)?g)$" This will delete the source folder if no mkv, mp4, avi, divx, mov, or mpeg files are found. If a file with the word "sample" in it is detected, then that file will be ignored and can be deleted.

Outputs

  1. Source folder deleted
  2. Folder was NOT deleted