Existing users, log in.  New users, create a free account.  Lost password?

Mac OS X  |  Internet  |  Other Internet  |  iTMS Extractor  |  Don't use an apostrophe in the filename!

iTMS Extractor

iTMS Extractor

save music videos and movie trailers

Version:  1.0

   [ Views: 479 ]

Don't use an apostrophe in the filename!

Feedback Type:  Usage Tip

Contributed by: hypert3000 Saturday, October 16 2004 @ 07:59 PM PDT

Product Platform: MacOSX

Used Product For: 6-12 months

Recommend Product: YES

In both the iTMS Extractor SW and the AppleScript submitted earlier, use of an apostrophe (a single-quote) in the filename causes an error. With iTMS Extractor, the error is silent, and unless you were watching, you don't realize that the file wasn't saved to your chosen location. The AppleScript at least gives an error. (Great job on the script, BTW!)

Here's an update to the script to catch apostrophes more gracefully:

set originalFile to do shell script "lsof | grep -i QTP | grep iTunes | head -1 | awk '{ print $9 }'"
set goodName to false
repeat until goodName
	if length of originalFile is greater than 0 then
		set newFile to POSIX path of (choose file name with prompt "Save movie as:" default name "iTunes Video.mov")
		if newFile contains "'" then
			display dialog "The filename you entered contained an apostrophe.

Please enter a name without an apostrophe."
		else
			set goodName to true
			if length of newFile is greater than 0 then
				if newFile does not end with ".mov" then set newFile to newFile & ".mov"
				do shell script "cp -v '" & originalFile & "' '" & newFile & "'"
			end if
		end if
	else
		display dialog "No movie found." buttons {"OK"} default button "OK"
	end if
end repeat

With this in mind, iTMS Extractor is fine to use for folks afraid of scripts. But, do yourself a favor and try the script out, too!   

1 of 1 users found this helpful.

Rate this Usage Tip

Was this Usage Tip helpful? Yes | No

Comments

0 comments |

No user comments.