Skip to content

Instantly share code, notes, and snippets.

@pwntr
Created August 24, 2024 08:10
Show Gist options
  • Save pwntr/ade26c79c406d6b257e6651d918d05ec to your computer and use it in GitHub Desktop.
Save pwntr/ade26c79c406d6b257e6651d918d05ec to your computer and use it in GitHub Desktop.
Creates .iso files for DVD video per sub-folder containing VIDEO_TS folders with DVD files
#!/bin/bash
# Loop over all sub-folders in the current directory
for dir in */; do
# Remove the trailing slash from the directory name
folder_name=$(basename "$dir")
# Create the .iso file with the same name as the sub-folder
mkisofs -o "${folder_name}.iso" \
-V "$folder_name" \
-volset "$folder_name" \
-publisher "PUBLISHER_NAME" \
-preparer "PREPARER_NAME" \
-appid "" \
-sysid "" \
-dvd-video "$dir"
echo "Created ISO for $folder_name"
done
echo "All ISOs have been created."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment