Batch exporting QuickTime HREF tracks - any help appreciated

Hello All!

This is my first time posting, and I appreciate any help or pointers anyone can give me…

Here is my situation:

I have a folder (and subfolders) of QuickTime .mov files.
They all have an HREF track (it is disabled in each file).

I am in need of an AppleScript that will go through the folder(s) and export each .mov’s HREF track as a .txt file.

I can open each file manually in QuickTime Pro, enable the HREF track, then export: “Text to Text”.
This works fine, however, I have well over 1500 .mov files.

If anyone can point me in the right direction, I’d be so thankful.

Regards,
Joe

Getting there…

Here is what I have so far:

tell application "QuickTime Player"
	activate
	if not (exists document 1) then return
	stop every document
	
	try
		tell document 1
			set enabled of track "HREFTrack" to true
			set myName to name as text --gets the name of the current document
			set thePath to (POSIX file path of container of myName) as text --this gets the path
			set cleanName to (text items 1 through -5 of (thePath as string) as list) as string
			set the this_name to (cleanName & ".txt") as string
			
			set the new_file to this_name
			export to the new_file as text file using settings preset "Text with Descriptors"
			close saving no
		end tell
		
		
	end try
end tell

This works with an already open file.

Any hints as to batch run it on a folder of QT movies?

Regards,
Joe

Closer Still…
If I save this script as an app, I can drag multiple files onto it…

on open the_movie
	repeat with the_movie in the_movie
		tell application "QuickTime Player"
			open the_movie
			try
				tell document 1
					set enabled of track "HREFTrack" to true
					set myName to name as text --gets the name of the current document
					set thePath to (POSIX file path of container of myName) as text --this gets the path
					set cleanName to (text items 1 through -5 of (thePath as string) as list) as string
					set the this_name to (cleanName & ".txt") as string
					
					set the new_file to this_name
					export to the new_file as text file using settings preset "Text with Descriptors"
					close saving no
				end tell
			end try
		end tell
	end repeat
end open

What I need to be able to do is drop a folder ( with subfolders) onto this app and have it export all the HREF tracks.
(the HREF tracks get exported right next to the original .mov files)

TIA,
Joe