• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Converting MOD files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting MOD files


  • Subject: Re: Converting MOD files
  • From: Peter Baxter <email@hidden>
  • Date: Tue, 15 May 2007 17:51:48 +1000

Hi Nigel,

I got back to work today and tried the scripts both you and Michelle offered. They certainly changed the extension, however quicktime was unable to work with the resulting files.
As the MOD files are generally large, I can't offer one for perusal, but there must be something more than the extension different in the type of file. Using a script to get the file type gives the right type.


Peter

On 13/05/2007, at 9:32 PM, Nigel Garvey wrote:

Michelle Steiner wrote on Fri, 11 May 2007 07:20:31 -0700:

If all that this involves is changing the file extension, and not the
data, this will do it.

set foo to choose folder
tell application "Finder"
	set bar to (files of foo whose name extension is "mod")
	try
		set bar to bar as alias list
	on error
		set bar to {bar as alias}
	end try
	repeat with foobar in bar
		if the extension hidden of foobar is false then
			set flag to false
		else
			set flag to true
		end if
		set the extension hidden of foobar to true
		set the name of foobar to the displayed name of foobar & ".dv"
		if flag is false then set the extension hidden of foobar to false
	end repeat
end tell

Hi, Michelle.

The above only works properly if "Show all file extensions" is left
unchecked in the Finder's "Advanced" preference pane. Otherwise the ".dv"
will simply be tacked on after the ".mod".


A more reliable and less file-intensive approach would be:

  set foo to (choose folder)
  tell application "Finder"
    set bar to (name of files of foo)
    repeat with foobar in bar
      if (foobar ends with ".mod") then set the name of file foobar of
foo to text 1 thru -5 of foobar & ".dv"
    end repeat
  end tell


NG

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript- email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com
Archives: http://lists.apple.com/archives/applescript-users


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Re: Converting MOD files (From: "Nigel Garvey" <email@hidden>)

  • Prev by Date: Re: Filemaker 8.5 stored applescript problem
  • Next by Date: Re: Quark 7 scripting... does it work well?
  • Previous by thread: Re: Converting MOD files
  • Next by thread: RE: Quark issue with grouped box & bounds [follow-up]
  • Index(es):
    • Date
    • Thread