macのAutomatorでタブ区切りのテキストファイルをCSVファイルに変換したいです

タブ区切りのテキストファイルで受注データが取得できます。

このデータをゆうパックプリントというソフトに取りむ必要があります。



そのため、タブ区切りのテキストファイルをCSVファイルに変換したいです。

あまり良いソフトが見つからなかったため、MacのAutomatorで出来ないかと思いました。

(他に良いソフトがあればそちらを使いたいです)



Automatorで作る場合は、どのようにしたら良いでしょうか?

ドラッグか右クリックで対象のファイル変換する、といった使い方がしたいです。

可能でしょうか?


よろしくお願いします。

iMac-OTHER, OS X Mountain Lion

投稿日 2013/10/15 03:13

返信
返信: 16

2013/10/18 07:23 亀どん への返信

亀どん さん

フォローありがとうございます。


帰ったら話が大分先に進んでました。とりあえず「タブ」→「カンマ」でやってみることになったんですね。


終了ダイアログの AppleScript はこんな感じでどうでしょう?シェルスクリプト→AppleScript で終了ダイアログ...というのを良くやるので、これを使い回してたりします。


ダイアログにファイルを表示、11個以上は「その他 n 項目」と表示します。


AppleScript を実行

property msg1 : "処理が完了しました。" property msg2 : "なし" property msg3 : "他 “" property msg4 : "項目”" on run {argv}     try         set argc to count argv                 if argc = 0 or argv is {""} then             set msg to msg2         else if argc < 11 then             set msg to conv_ary2str(argv, 10)         else             set msg to conv_ary2str(items 1 thru 10 of argv, 10) & return & ¬                 msg3 & (count of items 11 thru end of argv) & msg4         end if                 using terms from application "Finder"             tell me to activate             display alert msg1 message msg giving up after 60         end using terms from             on error err_msg number err_num         using terms from application "Finder"             tell me to activate             display alert "Error!" message err_num & ": " & err_msg as warning         end using terms from     end try end run -- subroutine: conv_ary2str(ary, n) -- tab:9 cr:13 nl:10 space:32 period:46 comma:44 slash:47 on conv_ary2str(ary, n)     set ifs_org to text item delimiters of AppleScript     set text item delimiters of AppleScript to character id (n)     set str to ary as text     set text item delimiters of AppleScript to ifs_org     return str end conv_ary2str

このスレッドはシステム、またはAppleコミュニティチームによってロックされました。 問題解決の参考になる情報であれば、どの投稿にでも投票いただけます。またコミュニティで他の回答を検索することもできます。

macのAutomatorでタブ区切りのテキストファイルをCSVファイルに変換したいです

Apple サポートコミュニティへようこそ
Apple ユーザ同士でお使いの製品について助け合うフォーラムです。Apple Account を使ってご参加ください。