Skip to content

Instantly share code, notes, and snippets.

@btTeddy
btTeddy / mover.php
Last active March 25, 2023 17:29 — forked from tdrnlds/mover.php
Move directories in which all the MKV and MP4 video files have only one hard link, designed for Unraid
#!/usr/bin/php
#backgroundOnly=true
#arrayStarted=true
#clearLog=true
#noParity=true
# name=tdrnlds custom mover script. Move from cache to disk
# The script will search in cache drive for *.mkv, *.mp4, *.avi, for files with only one hardlink (aka original file) in $source (default: movies).
# If found mixture of files in the same folder e.g *.mkv with hardlink=1 and *.mkv with hardlink=2 folder will be skiped.
# Once files are found it will mark folder containing those files any additional files beside to be moved from $source to $destination until $threshold is acheived.