Skip to content

Instantly share code, notes, and snippets.

@ser1zw
Created July 19, 2010 16:41
Show Gist options
  • Save ser1zw/481643 to your computer and use it in GitHub Desktop.
Save ser1zw/481643 to your computer and use it in GitHub Desktop.
/*
itunes_conv.js - iTunesの曲名を変換するスクリプト(Windows用)
[使い方]
(1) iTunesを開く
(2) 変換したい曲を選択(複数選択可)
(3) このスクリプトを実行(ファイルをダブルクリック
or コマンドプロンプトで wscript itunes_conv.js)
[参考]
http://www1.atwiki.jp/itunes/pages/26.html
http://d.hatena.ne.jp/prime503/20090914/1252883786
*/
var iTunesApp = new ActiveXObject("iTunes.Application");
var tracks = iTunesApp.SelectedTracks;
for(var i = 1; i <= tracks.Count; i++) {
// '[Artist] Title' => 'Title'に変換
tracks(i).Name = tracks(i).Name.replace(/^\[.+\]\s+(.+)$/, "$1");
}
WScript.Echo("Done.");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment