Create an empty .info.json file for each video filename (sidecar).
This commit is contained in:
parent
af5ebf21f1
commit
6800d6f979
21
create-json-alongside.bash
Normal file
21
create-json-alongside.bash
Normal file
@ -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
|
||||
Loading…
x
Reference in New Issue
Block a user