English 中文(简体)
Apple 制作并改用其他档案
原标题:Applescript create and rename file from other files

为了进口MOV(h.264)至Cut Pro I号案,需要一张编码。 THM 案号与MOV相同。 能否用一个 Apple子或自动装置来做到这一点? 在这方面,我想做的是:

  1. Create a copy of a "TEMPLATE.THM" file that already exists on my HD
  2. Rename the "TEMPLATE.THM" file using the .MOV filename
  3. Do this to a folder of .MOV files to create a .THM file for every .MOV file both with the same filename.
最佳回答

www.un.org/Depts/DGACM/index_spanish.htm Gday

这也许不是最快的方式——但我看到你仍在等待答复——因此,你开始做些什么。 挑选出主人的所有身份证,并用文字编辑处理。

set theTemplate to "Macintosh HD:Users:[user name]:[folder:location]:TEMPLATE.THM"

tell application "Finder"
  set theFiles to selection
  repeat with thisFile in theFiles
    set thisName to name of thisFile
    set theFolder to container of thisFile
    set newFile to duplicate theTemplate to theFolder

    set text item delimiters of AppleScript to "."
    set thisName to text item 1 of thisName
    set text item delimiters of AppleScript to ""

    set newName to (thisName & ".THM")
    set name of newFile to newName
  end repeat
end tell

进入模板最容易的方法是选择在发现器中,并操作:

tell application "Finder"
    set theFile to selection as string
end tell

这将把这条道路放在你的成果窗口上——仅将其复制到上述文字的第一行。

帮助的希望

<>

问题回答

暂无回答




相关问题
Extract files with invalid characters in filename with Python

I use python s zipfile module to extract a .zip archive (Let s take this file at http://img.dafont.com/dl/?f=akvaleir for example.) f = zipfile.ZipFile( akvaleir.zip , r ) for fileinfo in f.infolist(...

Append date to filename in linux

I want add the date next to a filename ("somefile.txt"). For example: somefile_25-11-2009.txt or somefile_25Nov2009.txt or anything to that effect Maybe a script will do or some command in ...

With php cURL get filename from file header

I have this php cURL function: function curl_login($url,$data,$proxy,$proxystatus){ $fp = fopen("cookietlt.txt", "w"); fclose($fp); $login = curl_init(); curl_setopt($login, CURLOPT_COOKIEJAR, "...

Get the longest non-glob string at the start of a string

I m trying to create a script to convert from $GIT_DIR/info/exclude to .gitignore files. I d like to put the .gitignore files as close to the pattern target as possible, meaning that a glob like /a/b/*...

热门标签