From 6800d6f9798c2b0901c13efc7719b0e7beac6d35 Mon Sep 17 00:00:00 2001 From: sickprodigy Date: Tue, 21 Oct 2025 19:45:27 -0400 Subject: [PATCH] Create an empty `.info.json` file for each video filename (sidecar). --- create-json-alongside.bash | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 create-json-alongside.bash diff --git a/create-json-alongside.bash b/create-json-alongside.bash new file mode 100644 index 0000000..b4351de --- /dev/null +++ b/create-json-alongside.bash @@ -0,0 +1,21 @@ +#!/bin/bash +template="Example.info.json" + +# Verify template exists +if [ ! -f "$template" ]; then + echo "Error: $template not found." + exit 1 +fi + +# Collect all matching video files safely +for f in *.mp4 *.mkv *.mov *.avi; do + # Skip if no matching files + [ -e "$f" ] || continue + [ -f "$f" ] || continue + + base="${f%.*}" # Remove extension + target="${base}.info.json" # Construct new name + + cp -- "$template" "$target" + echo "Created: $target" +done