Q: Convert VIDEO_TS FOLDERS to ISO applescript
Hello
I have several VIDEO_TS folders from my DVD collection. I learn I can use the terminal to convert them to ISO files.
with this terminal conversion I found here.
hdiutil makehybrid -udf -udf-volume-name NameOfYourDVDHere -o ImageFileName.iso /path/to/VIDEO_TS/parent/folder
I would like to wrap it in an AppleScript whit these additional options:
1st The Script Chooses various VIDEO_TS folder. Previously I already put the VIDEO_TS folder in another named with the film title. Example so the folder will be FILMNAME––>VIDEO_TS and the result should be FILMNAME.ISO
2nd Locates a folder where save the ISO files
3rd Batch performs the conversion through the terminal
4th and more
Continues to convert VIDEO_TS folders until they are all converted
Is this easy and possible?
Thanks for any help.
Mac mini, OS X Yosemite (10.10.5)
Posted on Sep 28, 2016 8:22 AM
Hello
NAS = Network-attached Storage, which is a class of storage accessed via network. E.g., if your OtherFilms volume is on a network and you mount it via AFP, SMB etc, it is NAS. Meanwhile, if your OtherFilms volume is of an external hard disk attached via USB, FireWire etc, it is not NAS (usually).
---
As for the missing .IFO files, I wonder your original command using hdiutil in Terminal produces complete iso image with those files in question?
In other words, provided that your source VIDEO_TS directory is ~/Desktop/test/FilmName/VIDEO_TS, does the following commands in Terminal produce proper iso image as ~/Destop/test/FilmName.iso:
#!/bin/bash cd ~/Desktop/test || exit hdiutil makehybrid -udf -udf-volume-name FilmName -o FilmName.iso FilmName
?
If it does, I see no reason why the following script, that is the same as the preivous alternative except for src and dst, does not:
--APPLESCRIPT 2a
set src to (path to desktop)'s POSIX path & "test"
set dst to src
set args to ""
repeat with a in {src, dst}
set args to args & a's quoted form & space
end repeat
do shell script "/bin/bash -s <<'EOF' - " & args & "
SRC=${1%/}
DST=${2%/}
TMP=~/Desktop
cd \"$TMP\" || exit
while IFS= read -r -d $'\\0' f
do
# f = VIDEO_TS directory
# d = f's parent directory
# n = d's name
d=${f%/*}
n=${d##*/}
hdiutil makehybrid -udf -udf-volume-name \"$n\" -o \"$n.iso\" \"$d\"
mv \"$n.iso\" \"$DST\"
done < <(find \"$SRC\" -type d -iname VIDEO_TS -print0)
EOF"
--END OF APPLESCRIPT 2a
Regards,
H
Posted on Oct 1, 2016 4:25 PM