Skip to content

Instantly share code, notes, and snippets.

@RYNEQ
Last active September 4, 2021 09:15
Show Gist options
  • Save RYNEQ/f319458eee8eddfe1bfcdf6d4ab1efbf to your computer and use it in GitHub Desktop.
Save RYNEQ/f319458eee8eddfe1bfcdf6d4ab1efbf to your computer and use it in GitHub Desktop.
Script to review videos and move them to another directory with confirmation
#!/bin/bash
me=`basename "$0"`
if [ "$#" -ne 1 ]; then
echo "Usage: $me src_dir dst_dir"
exit 1
fi
src="$1"
dst="$2"
while IFS= read line <&3
do
mpv --really-quiet "$line";
read -p "Move? " move;
if [ $move == 'y' ]
then
mv "$line" "$dst"
fi
done 3< <(find "$src" -iname '*.mp4' -iname '*.mkv')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment