Re: Converting MOD files
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