• 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: Renaming subtitles.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Renaming subtitles.


  • Subject: Re: Renaming subtitles.
  • From: "koenig.yvan" <email@hidden>
  • Date: Mon, 01 Apr 2013 20:31:26 +0200


Le 01/04/2013 à 19:34, Manuel <email@hidden> a écrit :

Hello, Yvan. 

Thank you for your help. It worked really well. 
I was using a folder action because once I download the subtitle in another folder, move it here and doing it automatically, and once it´s done, even trying (I can´t figure it ) to move the subtitle and the video file to a final folder where I keep all the subtitled TV Shows ("Series Subtituladas" folder in the same disk).  

Thanks again for your help and time. 
Manuel. 


I on't like to drive the Finder so I made a few changes to drive System Events.

on run
set fileExtensions to {"mkv", "mp4"}
tell application "System Events"
set origen to files of folder "WINOSX:TV SERIES:"
try
repeat with subtitle in origen
if name extension of subtitle is "srt" then exit repeat
end repeat


repeat with episode in origen
if name extension of episode is in fileExtensions then
set episodename to name of episode
set episodenameNoExtension to (text 1 thru -5 in episodename)
if name of subtitle contains (text 1 thru 7 in episodename) then
set the name of subtitle to episodenameNoExtension & ".srt"
end if
end if
end repeat
end try
end tell
end run

Yvan KOENIG (VALLAURIS, France) lundi 1 avril 2013 20:31:21



 _______________________________________________
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: Renaming subtitles. (From: "koenig.yvan" <email@hidden>)

  • Prev by Date: Re: Renaming subtitles.
  • Next by Date: Passing InDesign variables from one script to an other
  • Previous by thread: Re: Renaming subtitles.
  • Next by thread: Passing InDesign variables from one script to an other
  • Index(es):
    • Date
    • Thread