a document file ( “txt” as extension) with path annotations
Toast Titanium -burn software
Sometimes, when my download folder becomes full (4 Giga), i decide to burn these Data.
But i put only selected items into my “backup” folder, (in the home folder) and i burn nothing of all this data on disc.
I add my files, without dragging, but via keyboard-shortcut, which activates obvious, a applescript, whose puts a text-file in this “backup” -folder writing the path of the selected items in this text-file. This text -file will be rewritten every time i add some new selected material to this “backup” folder. Now, my question is:
how can i do, to make read this text -file, (without using “TextEdit” ) and importing the readed paragraphs, one by one, “directly” into the “burn” -window of “Toast Titanium”, using this text-document ? (someone has a good shell script under the hand (fingers)?)
…Ok, i’ve downloaded some shell scripts documents today, but it takes some time befor i can apply some new knowledge…Thanks
try this, the script assumes HFS paths (colon separated)
set newName to "Backup_" & (do shell script "/bin/date +%Y%m%d_%H%M%S")
set inputFile to ((path to desktop as text) & "backup.txt")
set theFiles to {}
repeat with i in (get paragraphs of (read file inputFile))
set end of theFiles to (i as alias)
end repeat
tell application "Toast Titanium"
activate
set newDisk to make new Data disc with properties {name:newName, file system type:Mac OS Extended}
add to newDisk items theFiles
-- write newDisk
end tell
…does not import the list of items into Toast, returns a error with “my” Toast t. Perhaps because you uses “Toast t.” version 9 ?(it imports differently from v 8 too, i know) i’ve removed the newer version, because the application has had various problems during the burning (writing the data) and verifying (scanning the data disc for some write errors) of DVD’s.
I think that the cause for failure (not of the script, i mean of the working processes of Toast)was not always to be charged to the current supply (I use a external Dual -Layer drive of Philips (SPD3400CC) to do this job).
Now the script has changed in:
set Bk_folder to "B" & (do shell script "/bin/date +%Y%m%d")
set inputFile to ((the_f & "Backup:" as text) & "Backup List.txt")
tell application "Toast Titanium"
activate
set newDisk to make new Data disc with properties {name:Bk_folder, file system type:Mac OS Extended, resolve aliases:true}
repeat with i in (get paragraphs of (read file inputFile))
set theFiles to (i as text)
add to newDisk items alias (theFiles)
end repeat
end tell