Batch Process: Difference between revisions

From LemonWiki共筆
Jump to navigation Jump to search
 
(82 intermediate revisions by the same user not shown)
Line 1: Line 1:
批次動作 (batch actions ex:convert file format...)
將例行或固定的多次動作,改為批次動作 (batch actions) 完成: 一次處理批量/多個檔案


== adobe photoshop 7 批次處理影像檔 ==
{{Tip | tip= Search keyword strategy: try to search the following keywords:
# 視窗 -> 動作 : 開啟動作工作視窗
* '''batch''' do something
# 步驟紀錄, 動作, 工具預設集分頁: 選擇動作分頁
* do something with the '''command line'''
# 開啟一個待處理的檔案
}}
# 建立新增組合 -> 建立新增動作
 
# 開始紀錄各個動作步驟
== 批次改檔名 ==
# 停止紀錄
批次改檔名: 依據給定的規則, 重新命名多個檔案的檔名
# 儲存檔案, 關閉
* {{Gd}} [[Total Commander]] (official webpage: [http://www.ghisler.com/ Total commander]) for {{Win}}:
# 開啟另一個待處理的檔案
** 同一資料夾(先選擇多個檔案後) Files -> Multi-Rename tool: 套用更名規則前,可以預覽修改後的檔名。
# 動作分頁: 播放選取的動作
** 不同資料夾,搜尋特定檔案後 -> Feed to listbox -> (先選擇多個檔案後) Files -> Multi-Rename tool: 套用更名規則前,可以預覽修改後的檔名。
* [http://www.class2u.idv.tw/graphic/20photoshop/ss04c.htm Photoshop 5.0 tips - 批次處理]
** 支援「正則式」([[Regular expression]]) 替換
* [http://manytricks.com/namemangler/ Name Mangler] for {{Mac}} {{access | date = 2015-09-21}}
* [http://hp.vector.co.jp/authors/VA014830/english/FlexRena/ Flexible Renamer] for {{Win}}: 支援 [[Regular expression]] (last visited: 2007年2月11日 上午 09:33:54)
* [http://kokafan13.pixnet.net/blog/post/23732296 用XP內建功能批次改檔名 @ ʎǝuoɯ ǝɥʇ ǝɯ ʍoɥs] for {{Win}} 選擇多個檔案或資料夾,按右鍵出現選單選擇「重新命名」,再輸入 new_name (1)
* [http://www.irfanview.com/ IrfanView] for {{Win}}  ([http://toget.pchome.com.tw/tip/drawing/tip_168.html 更名說明]) (last visited: 2006年4月14日)
 
{{Software version| software=IrfanView | url=http://www.irfanview.com/ |  version=3.99 }}
{| border="1"
| <b>目的</b>
|| <b>原檔名 例</b>
|| <b>更名後檔名 例</b>
|| <b>Name pattern</b>
|| <b>備註</b>
|-
| 取代原檔名(不含副檔名), 取代為image###
|| {original filename}.html
|| image001.html ~ image020.html
|| image###
||
|-
| 原檔名(不含副檔名)後在加上時間(精確至秒)
|| {original filename}.html
|| {original filename}_2006_3_31 _ 21_46_20.html
|| $N_$T
||
|-
| 原檔名(不含副檔名)後在加上時間(月與日)
|| {original filename}.html
|| {original filename}_03-31.html
|| $N_$T(%m-%d)
||
|-
| 原檔名(不含副檔名)插入文字 _text
|| abc.1, abc.2 ~ abc.20
|| abc_text.1 ~ abc_text.20
|| $N_text
||
|-
| 更改原檔名(不含副檔名)中的固定文字 aaa 為 abc
|| aaa_01.html, aaa_02.html ~ aaa_20.html
|| abc_01.html, abc_02.html ~ abc_20.html
|| $N 並且 (Set rename option) Replace text: aaa with abc
|| [[URL Encoding]]
|-
| ''trivial:'' 原檔名(含副檔名)插入文字 .gif
|| abc.1 ~ abc.20
|| abc.1.gif.1 ~ abc.20.gif.20
|| $F.gif
|| 無法透過批次更名方式, 替換[[FileExtensions|副檔名]]. 建議改用batch conversion
|}
 
----
* [http://www.chriswrites.com/how-to-use-automator-to-mass-rename-finder-items/ How To Use Automator In Mac Os X To Mass Rename Files] for {{Mac}} {{access | date = 2015-09-21}}
* ''$ 15 days trial'' [http://renamer.com/comparison.php Renamer - The fastest on the Mac] for {{Mac}} {{access | date = 2015-09-21}}
 
== 檔案格式的批次轉換 ==
* 音樂、文件、圖檔等檔案格式的批次轉換,請看[[File Convert]]
 
== 壓縮檔 ==
* 重新轉換壓縮檔的檔案格式: e.g. WinRAR (shareware): .zip, .rar, .cab, .lzh, .iso => what u want
* 將選擇的檔案各自壓縮成一個檔案 [https://superuser.com/questions/311937/how-do-i-create-separate-zip-files-for-each-selected-file-directory-in-7zip archiving - How do I create separate zip files for each selected file/directory in 7zip? - Super User]: Using [https://totalcmd.net/plugring/7zip_plugin.html 7Zip Plugin 0.7.6.6] for [[Total Commander]] {{access | date = 2018-01-19}}
 
= 聲音 =
== 修改MP3歌曲資訊(ID3Tag, metadata) ==
* [http://dershiun.24cc.cc/ dershiun's studio] - [http://home.pchome.com.tw/super/dershiun/id3editor/index.htm MP3標籤編輯程式]
* [http://www.mp3tag.de/en/ Mp3tag - the universal Tag Editor (ID3v1, ID3v2, APEv2)]
 
 
== Effects: Amplify the volume of sound files, convert stereo to mono, export to mp3... ==
* [http://manual.audacityteam.org/index.php?title=Batch_Processing Batch Processing] on [http://audacity.sourceforge.net/ Audacity] v.1.3
** Step1: menu > File > Edit Chains...
** Step2: Choose multiple audio/sound files to one project
** Step3: menu > File > Apply Chain...
** Step4: menu > File > Export Multiple...
 
= 文件 =
== 將多個網頁製作成電子書(.chm) ==
* [[Mozilla Firefox|Firefox]] ({{Fx}}) + [http://amb.vis.ne.jp/mozilla/scrapbook/ ScrapBook] + [http://amb.vis.ne.jp/mozilla/scrapbook/addons.php?lang=en#CHMExporter ScrapBook CHM Exporter]


== 其他 ==
== 多個檔案的簡繁體轉換、編碼轉換 ==
* 重新命名檔案名稱
* [http://www.azofreeware.com/2006/03/convertz-802.html ConvertZ] {{exclaim}} 原作者[http://alf-li.pcdiscuss.com/c_convertz.html 網頁] 無法連線 {{access | date = 2016-11-18}}
** [http://www.hokoy.com/ 老胡的烘焙雞] - [http://www.hokoy.com/Works/Program/KoyRenamer.aspx 檔案改名器](免費軟體)
** 含繁簡用語轉換 e.g. (繁體) 軟體 (簡體) 软件
* [http://reg.softking.com.tw/freeware/index.asp?fid1=2&fid2=342&fid3=22194 檔案工具箱]
* [https://www.emeditor.com/help/faq/file/file_convert.htm EmEditor FAQ: How can I convert file encodings with the command line?] ex:


* 重新轉換壓縮檔的檔案格式
UTF-8 -> Chinese Traditional (big5):  
** WinRAR (shareware): .zip, .rar, .cab, .lzh, .iso => whay u want
"C:\Program Files\EmEditor\EmEditor.exe" "c:\path\to\utf8.txt" /cp 65001 /cps 950 /ss- /sa  "c:\path\to\big5.txt"
UTF-8 -> Chinese Simplified (gb2312):
"C:\Program Files\EmEditor\EmEditor.exe" "c:\path\to\utf8.txt" /cp 65001 /cps 936 /ss- /sa  "c:\path\to\gb.txt"


* 轉換音樂格式
多個檔案的編碼方式轉換
** [http://www.dbpoweramp.com/ dBpowerAMP] - dBpowerAMP Music Converter (dMC) 部分中文目錄字串無法辨識,建議將欲轉換的聲音檔直接放到C槽的根目錄
* {{Gd}} [https://www.rotatingscrew.com/utfcast-professional.aspx UTFCast Professional, Batch UTF Converter, Convert Text to UTF-8, UTF-16 and UTF-32]
* ''$'' [https://zh-tw.emeditor.com/text-editor-features/versatility/multiple-file-encoding-conversions/ 多個檔案的編碼方式轉換 - EmEditor (文字編輯器)]
** 不含繁簡用語轉換


* 修改MP3歌曲資訊(ID3Tag, metadata)
== 尋找與取代(多個檔案)的內文文字 ==
** [http://dershiun.24cc.cc/ dershiun's studio] - [http://home.pchome.com.tw/super/dershiun/id3editor/index.htm MP3標籤編輯程式]
[[Desktop_search#Search_text_in_files |Search text in files]]
* ex: [http://www.emeditor.com/ EmEditor Text Editor], [http://notepad-plus.sourceforge.net/ NotePad++], [http://www.funduc.com/word_sr.htm Word Search and Replace] ...
* [http://dreamtails.pixnet.net/blog/post/27845385-%E7%94%A8sed%E5%81%9A%E6%90%9C%E5%B0%8B%28search%29%E4%B8%A6%E5%8F%96%E4%BB%A3%28replace%29 用Sed做搜尋(Search)並取代(replace) @ 回憶......! :: 痞客邦 PIXNET ::]


* 簡繁體文件轉換
正規表示法的批次取代
** [http://www.hokoy.com/Works/Program/FileToolbox.aspx 檔案工具箱], [http://alf-li.tripod.com/c_convertz.html ConvertZ]
* [[Regular_expression#Regular expression batch tools| Regular expression batch tools]]


* 文件轉換成PDF
== PDF檔每頁自動插入頁碼 ==
** [http://www.pdfpdf.com/batch.html Batch Convert] (trial)
{{Software version| software=Adobe acrobat | url=http://www.adobe.com/ |  version=7 }}
* Advanced -> Batch Processing...
* New Sequence -> Input a name for this sequence ex: Insert page number
** Select sequence of commands: Document: Add headers & Footers
** Switch to Footer label -> click the middle text box -> Insert Page Number: Style: 1 -> click the 'Insert' button
** Run commands on: Ask When Sequence is Run
** Select output location: Same Folder as Original(s)
* Select the sequence (Insert page number), and click the 'Run Sequence' button
* Select the file(s) to process (Note: the file need to be '''closed''' first!)


* 尋找與取代內文的文字
= 圖檔 =
** [http://www.funduc.com/word_sr.htm Word Search and Replace] (多個檔案)


* 轉換圖檔的檔案格式
== 批次修改圖形尺寸 / Batch resize images ==
** [http://www.wavelsoftware.com/pic2pic.htm Pic2Pic]([http://toget.pchome.com.tw/intro/drawing_transfer/12247.html 中]) 檔案格式、顏色解析度、鏡像、旋轉
* {{Gd}} [https://www.pkstep.com/archives/10640 PhotoCap] for {{Win}} 批次修改圖形尺寸大小、與內容(加外框、解析度)
** 選單 --> 功能: 批次... ({{exclaim}} 如果將 png 檔同時作圖形處理,然後再轉檔成 gif 會失去透明屬性,建議分成兩步驟,先轉檔,再作圖形處理。)
* [http://www.bricelam.net/ImageResizer/ Image Resizer] for {{Win}}
** 教學: [http://brownywalking.blogspot.com/2011/01/image-resizer-for-windows.html  Browny Walking: 右鍵批次影像縮放工具 - Image Resizer for Windows]
* [http://osxdaily.com/2009/12/16/batch-resize-images-on-mac-with-preview/ Batch Resize Images on Mac with Preview] for {{Mac}}
* [http://www.codingmammoth.com/quickscale.php QuickScale] v.4.1.3 for {{Mac}} 批次修改圖形尺寸大小、加上浮水印。'''免費版'''可同時批次修改 3 張圖片的尺寸大小。
* [http://www.xnview.com/en/xnconvert/ XnView XnConvert] for {{Win}}, {{Mac}} & Linux
* [http://semigeek.wordpress.com/dropresize/ Dropresize « SemiGeeK] 教學: [http://blog.soft.idv.tw/?p=616 超簡單好用的免費縮圖軟體Dropresize,只要拖曳檔案就能輕鬆做出縮圖!]
* [http://www.inspire-soft.net/?nav=soft_easyimagemodifier Easy Image Modifier] 教學: [http://briian.com/?p=7080 Easy Image Modifier 圖檔尺寸批次修改工具]
* [http://www.sheldonsolutions.co.uk/photomagician/ Photo Magician] 教學: [http://briian.com/?p=7394 Photo Magician 大量圖檔批次轉檔、改大小工具]
* [http://union-d.ru/node/6 Image Tools] 教學: [http://blog.soft.idv.tw/?p=885 免安裝又超迷你的免費影像處理軟體,縮圖、裁切、浮水印輕鬆搞定! | ㊣軟體玩家]
* [http://www.xnconvert.com/ XnConvert | Convert, Resize and many more] 可批次修改圖形尺寸大小、自動裁切等。 教學: [http://steachs.com/archives/2478 影像處理軟體《XnConvert》可批次處理圖片相關後製,包含色彩、大小、效果、浮水印及更多實用功能 | 就是教不落]


* 批次修改圖形尺寸大小、與內容(加外框、解析度)
== 尋找重複的圖檔 ==
** [http://www.johnson-wang.idv.tw/ PhotoCap]
* [http://www.prismaticsoftware.com/Utility/Utility.html Dup Detector]


* 尋找重複的圖檔
== 批次加文字 ==
** [http://www.prismaticsoftware.com/Utility/Utility.html Dup Detector]
* [https://mrguarder.blogspot.com/2021/09/xnview-watermark.html 糊塗流浪貓: XnView - 替代格式工廠 - 免費批次轉檔、裁剪、浮水印影像處理工具]


== 批次壓縮圖檔 ==
* [https://stackoverflow.com/questions/27267073/imagemagick-lossless-max-compression-for-png ImageMagick: Lossless max compression for PNG? - Stack Overflow]


== Adobe photoshop 7 批次處理影像檔 ==
# 視窗 -> 動作 : 開啟動作工作視窗
# 步驟紀錄, 動作, 工具預設集分頁: 選擇動作分頁
# 開啟一個待處理的檔案
# 建立新增組合 -> 建立新增動作
# 開始紀錄各個動作步驟
# 停止紀錄
# 儲存檔案, 關閉
# 開啟另一個待處理的檔案
# 動作分頁: 播放選取的動作
* [http://www.class2u.idv.tw/graphic/20photoshop/ss04c.htm Photoshop 5.0 tips - 批次處理]


* 使用DOS自動命令檔(Batch File 即 .bat)執行批次命令 [http://www.computerhope.com/batch.htm]
== 圖檔轉換 ==
: 例如: 重整IP
[[Image converter]]


ECHO Release IP
= 一次開啟多個程式 =
ipconfig /release
* [http://blog.xuite.net/muhua67/blog/15726488 Windows小技巧:使用批次指令快速打造你的工作環境:帕帕亞浩斯 (PAPAYA HOUSE):Xuite日誌]
ipconfig /renew
ping www.hinet.net
:end


= 地址轉經緯度 =
[[Batch convert address to coordinates]]


[[Category:Software]]
[[Category:Software]]

Latest revision as of 13:40, 19 September 2024

將例行或固定的多次動作,改為批次動作 (batch actions) 完成: 一次處理批量/多個檔案

Owl icon.jpg Search keyword strategy: try to search the following keywords:
  • batch do something
  • do something with the command line

批次改檔名[edit]

批次改檔名: 依據給定的規則, 重新命名多個檔案的檔名

IrfanView v.3.99


目的 原檔名 例 更名後檔名 例 Name pattern 備註
取代原檔名(不含副檔名), 取代為image### {original filename}.html image001.html ~ image020.html image###
原檔名(不含副檔名)後在加上時間(精確至秒) {original filename}.html {original filename}_2006_3_31 _ 21_46_20.html $N_$T
原檔名(不含副檔名)後在加上時間(月與日) {original filename}.html {original filename}_03-31.html $N_$T(%m-%d)
原檔名(不含副檔名)插入文字 _text abc.1, abc.2 ~ abc.20 abc_text.1 ~ abc_text.20 $N_text
更改原檔名(不含副檔名)中的固定文字 aaa 為 abc aaa_01.html, aaa_02.html ~ aaa_20.html abc_01.html, abc_02.html ~ abc_20.html $N 並且 (Set rename option) Replace text: aaa with abc URL Encoding
trivial: 原檔名(含副檔名)插入文字 .gif abc.1 ~ abc.20 abc.1.gif.1 ~ abc.20.gif.20 $F.gif 無法透過批次更名方式, 替換副檔名. 建議改用batch conversion

檔案格式的批次轉換[edit]

  • 音樂、文件、圖檔等檔案格式的批次轉換,請看File Convert

壓縮檔[edit]

聲音[edit]

修改MP3歌曲資訊(ID3Tag, metadata)[edit]


Effects: Amplify the volume of sound files, convert stereo to mono, export to mp3...[edit]

  • Batch Processing on Audacity v.1.3
    • Step1: menu > File > Edit Chains...
    • Step2: Choose multiple audio/sound files to one project
    • Step3: menu > File > Apply Chain...
    • Step4: menu > File > Export Multiple...

文件[edit]

將多個網頁製作成電子書(.chm)[edit]

多個檔案的簡繁體轉換、編碼轉換[edit]

UTF-8 -> Chinese Traditional (big5): 
"C:\Program Files\EmEditor\EmEditor.exe" "c:\path\to\utf8.txt" /cp 65001 /cps 950 /ss- /sa  "c:\path\to\big5.txt"

UTF-8 -> Chinese Simplified (gb2312): 
"C:\Program Files\EmEditor\EmEditor.exe" "c:\path\to\utf8.txt" /cp 65001 /cps 936 /ss- /sa  "c:\path\to\gb.txt"

多個檔案的編碼方式轉換

尋找與取代(多個檔案)的內文文字[edit]

Search text in files

正規表示法的批次取代

PDF檔每頁自動插入頁碼[edit]

Adobe acrobat v.7


  • Advanced -> Batch Processing...
  • New Sequence -> Input a name for this sequence ex: Insert page number
    • Select sequence of commands: Document: Add headers & Footers
    • Switch to Footer label -> click the middle text box -> Insert Page Number: Style: 1 -> click the 'Insert' button
    • Run commands on: Ask When Sequence is Run
    • Select output location: Same Folder as Original(s)
  • Select the sequence (Insert page number), and click the 'Run Sequence' button
  • Select the file(s) to process (Note: the file need to be closed first!)

圖檔[edit]

批次修改圖形尺寸 / Batch resize images[edit]

尋找重複的圖檔[edit]

批次加文字[edit]

批次壓縮圖檔[edit]

Adobe photoshop 7 批次處理影像檔[edit]

  1. 視窗 -> 動作 : 開啟動作工作視窗
  2. 步驟紀錄, 動作, 工具預設集分頁: 選擇動作分頁
  3. 開啟一個待處理的檔案
  4. 建立新增組合 -> 建立新增動作
  5. 開始紀錄各個動作步驟
  6. 停止紀錄
  7. 儲存檔案, 關閉
  8. 開啟另一個待處理的檔案
  9. 動作分頁: 播放選取的動作

圖檔轉換[edit]

Image converter

一次開啟多個程式[edit]

地址轉經緯度[edit]

Batch convert address to coordinates