WinRAR 是什麼

WinRAR 是 Windows 版本的 RAR 壓縮軟體，允許您建立、管理和控制壓縮檔案的強大工具。RAR 有很多版本，應用於多種操作環境：Windows、Linux、FreeBSD、macOS。

Windows 下的 RAR 有兩個版本：

  • 圖形化使用者介面版本 - WinRAR.exe；
  • 指令行 (純文字模式) 版本 - Rar.exe。

WinRAR 及 WinRAR 自解檔模組需要在 Windows XP SP3 及更高版本才能使用。

WinRAR 特性

  • 完全支援 RAR 和 ZIP 2.0 壓縮檔案；
  • 高度成熟的原創壓縮演算法；
  • 整合介面包括方便的拖放和精靈;
  • 指令行介面;
  • 非 RAR 壓縮檔案 (7Z, ARJ, BZ2, CAB, GZ, ISO, JAR, LZ, LZH, TAR, UUE, XZ, Z, 001 及其他多種 ZIPX 類型) 的管理；
  • 結實壓縮，比一般方法更能夠提高壓縮比 10% - 50%，尤其是在壓縮大量的小檔案、相似的檔案時；
  • 分割壓縮檔案;
  • 使用預設的或是選用的自解檔模組建立自解檔 (也可用於分割檔案)；
  • 修復外力受損的壓縮檔案；
  • 修復分割檔允許重建分割檔案壓縮中遺失的分割檔案。
  • 支援 Unicode 檔案名稱；
  • 其他服務功能，例如檔案加密、壓縮檔註解、錯誤記錄等。


WinRAR 的限制

由 WinRAR 建立的 RAR 跟 ZIP 壓縮檔，可以儲存無限數量跟無限大小的檔案。真正的限制在於檔案系統以及可用的記憶體。有些舊檔案系統不支援大於 4 GB 的單一檔案。

WinRAR 會調用記憶體來儲存每個進行壓縮的檔案的名稱及屬性。如果有加入快速開啟資訊，則需要兩倍的記憶體來儲存名稱及屬性。具體的用量根據以 big5 編碼的檔名長度而定，一般來說壓縮時，我們只會針對每個檔案占用幾百個位元組的記憶體給壓縮字典檔來分配記憶體。另外請注意 32 位元的 WinRAR 無法使用多於 2 GB 的記憶體。如果您需要處理大量大字典檔的壓縮，建議改用 64 位元版的 WinRAR。

最大檔案加密的密碼長度為 127 個字元，過長的部分就節略掉。


主控台 RAR 版本

在套裝軟體除了 WinRAR 您還會發現檔案 rar.exe。它也是用於 Windows 的 RAR 版本，但是只支援指令行，純文字模式的介面。它在 DOS 提示字元等情況下，從 BAT 和 CMD 檔案呼叫 RAR 時特別有用。與 WinRAR 相比，它支援大量指令行開關和指令，雖然指令行介面中涉及的 WinRAR 指令行文法的大多也適用於指令行 RAR，本說明檔不敘述這些只支援指令行版本的開關和指令。請閱讀 rar.txt 檔案來獲得所有指令行 RAR 功能的詳細敘述。


致謝

我們感謝 Ron Dwight，他為 RAR 和它的使用者做了這麼多。很遺憾 Ron 再也看不到新版 WinRAR。

WinRAR 包含Info-ZIP group 整合的壓縮代碼用來管理 ZIP 壓縮檔。

文字壓縮演算法來自 Dmitry Shkarin PPMII 及 Dmitry Subbotin carryless rangecoder public domain 原始碼。您可以在此找到 ftp.elf.stuba.sk/pub/pc/pack

WinRAR 加密部分採用 Szymon Stefanek 及 Brian Gladman AES 實作，亦為 Steve Reid SHA-1 原始碼。

WinRAR 使用的 CRC32 功能採自 Intel Slicing-by-8 演算法。

RAR 壓縮檔有時採用由 Jean-Philippe Aumasson, Samuel Neves, Zooko Wilcox-O'Hearn 及 Christian Winnerlein 開發的 BLAKE2sp 雜湊演算。

實用的提示提供者為 Alexander Khoroshev，而 Bulat Ziganshin 則明顯提升 RAR 壓縮速度。

7z 壓縮檔利用 7zxa.dll 程式庫處理，版權來自 Igor Pavlov，其為 7-Zip 壓縮程式開發者。7zxa.dll 乃基於 GNU Lesser General Public License (LGPL) 版本 2.1 或 更高者開發。您可以更動 7zxa.dll 的部分，或為了替 7zxa.dll 基於 LGPL 定義之下除錯而將之反組譯。XZ 及 LZMA ZIP 壓縮檔則使用 Igor Pavlov 之公開智慧財產 LZMA SDK。7zxa.dll 原始碼及 LZMA SDK 可以在 www.7-zip.org 找到。

我們採用 James S. Plank, Kevin M. Greenan 及 Ethan L. Miller 聯合發表的文獻 "Screaming Fast Galois Field Arithmetic Using Intel SIMD Instructions" 來增進 Reed-Solomon 程式碼的效能。我們也感謝 Artem Drobanov 與 Bulat Ziganshin 提供範例及想法，讓 Reed-Solomon 程式碼更有效率。

WinRAR 圖像設計者 Aditya Nugraha Putra，來自 weirdsgn.com

WinRAR 殼層延伸的概念來自 Ylian Saint-Hilaire 及其 "RAR shell extension" 程式。

特別感謝 Andrey Spasibozhko 協助開發並宣傳早期 RAR 版本。

WinRAR 正體中文版由一抹淺藍編譯，lightblue.idv.tw。


新手上路

圖形介面與指令行模式

WinRAR 可以依兩種方法使用：於圖形介面模式伴隨視窗介面，或者於指令行模式。要開啟 WinRAR 圖形介面，只要按兩下 WinRAR 圖示就行了。接著您可以使用按鈕及選單來壓縮及解壓縮。請參閱以下主題說明如何逐步操作。

  • 如何使用 WinRAR 介面解壓縮檔案
  • 如何使用 WinRAR 介面壓縮檔案

要使用 WinRAR 於指令行模式，必須要從 [開始] 功能表中找到 [所有程式]，[附屬應用程式] 裡面的 [命令提示字元]，或是從 [執行] 裡面直接輸入指令。您可以在下面找到壓縮及解壓縮的簡單範例，而詳細的敘述則位於指令行模式說明主題。 請注意如果您從指令行執行 WinRAR 而沒有參數，則會喚起圖形介面。

  • 如何使用指令行解壓縮檔案
  • 如何使用指令行壓縮檔案

如果您在安裝 WinRAR 的時候有選取 [整合 WinRAR 到系統介面] 選項，您可以直接從視窗介面 (檔案總管或桌面) 壓縮及解壓縮檔案。詳情如下。

  • 如何在檔案總管或桌面解壓縮檔案
  • 如何在檔案總管或桌面壓縮檔案


新手上路：如何使用 WinRAR 介面解壓縮檔案

要使用 WinRAR 圖形介面模式解壓縮檔案，首先您要在 WinRAR 中開啟需要的壓縮檔。下列幾個方式都可行：

  • 在 Windows 介面 (檔案總管或桌面) 對壓縮檔名點兩下或按 Enter 鍵。如果 WinRAR 在安裝過程中有關連該壓縮檔檔名 (這是預設的安裝選項)，則該壓縮檔會被 WinRAR 打開來。您可以在安裝之後使用 [整合] 設定對話方塊自行關聯到 WinRAR。
  • 在 WinRAR 視窗對壓縮檔名點兩下或按 Enter 鍵。
  • 拖曳壓縮檔至 WinRAR 的圖示或視窗上面。要這樣操作之前請確認 WinRAR 還沒有顯示別的壓縮檔，否則拖曳過來反而會把該壓縮檔加在顯示的壓縮檔裡面。
  • 在指令行模式執行 WinRAR，並把該壓縮檔檔名作為唯一的參數。

當 WinRAR 打開壓縮檔，也會顯示其內容。選擇要解壓縮的檔案及資料夾，您可以按 Shift + 箭號按鍵或 Shift + 滑鼠左鍵，就像在檔案總管以及其他視窗程式一樣。在 WinRAR 中您也可以使用空格鍵或 Ins 鍵來選擇檔案。數字鍵台上的 + 及 - 按鍵可以配合檔案遮罩選擇群組檔案。

選擇一或多個檔案之後，按 WinRAR 視窗上面的 [解壓縮到] 按鈕或按 Alt+E 按鍵，在對話方塊中輸入目的地資料夾，然後按 [確定]。此對話方塊也提供其他進階選項 (請參閱 [解壓縮路徑及選項] 對話方塊)。

在解壓縮的過程中，會顯示處理進度的視窗。如果您希望中斷解壓縮，則再視窗中按 [取消]。您也可以按 [背景] 按鈕將 WinRAR 縮小到工作列。如果解壓縮完畢沒有出現錯誤，WinRAR 會回到原來的介面，如果有錯誤則會顯示診斷訊息視窗。


新手上路：如何使用指令行解壓縮檔案

解壓縮檔案並包含完整路徑的指令行語法是：

WinRAR X [-開關] <壓縮檔> [檔案] [@檔案清單] [目標資料夾\]

解壓縮檔案並忽略路徑：

WinRAR E [-開關] <壓縮檔> [檔案] [@檔案清單] [目標資料夾\]

例如，您要從壓縮檔 LETTERS.RAR 解壓縮檔案 LETTER.TXT 到目前資料夾時，使用如下指令：

WinRAR X LETTERS.RAR LETTER.TXT

壓縮檔案的副檔名是選用的，並且可以忽略。

下一個指令是從壓縮檔案 Songs 解壓縮所有 *.WAV 檔案到 Audio 資料夾：

WinRAR X Songs *.WAV Audio\

也可以在檔案內列出要解壓縮的檔案，而不是在指令行上逐一列出它們。這種情況下，必須在指令行提供包含需要解壓縮檔案的清單檔案名稱。在這個檔案名稱前加入符號 @ 作為標識。這樣，如果您建立一個檔案 Binaries，裡面含有字串 *.exe 和 *.com，然後執行指令：

WinRAR X TOOLS @Binaries

TOOLS 壓縮檔中帶 EXE 和 COM 副檔名的所有檔案，將被解壓縮至此。

解壓縮期間，將會出現一個視窗來顯示操作的狀態。如果您希望中斷解壓縮的進行，在對話方塊按一下 [取消] 按鈕。您也可以按一下 [最小化] 按鈕將 WinRAR 最小化到工作列。如果解壓縮完成並且沒有錯誤，WinRAR 會自動關閉。如果發生錯誤，則會顯示錯誤診斷資訊視窗。

參閱指令行介面可以獲得指令和選項的詳細敘述。


新手上路：如何在檔案總管或桌面解壓縮檔案

如果安裝 WinRAR 時沒有停用 [整合 WinRAR 到系統介面] 選項，可以在 Windows 介面內直接解壓縮檔案。在壓縮檔案圖示上按一下滑鼠右鍵，選擇 [解壓縮檔案] 指令，在對話方塊內輸入目標資料夾並按一下 [確定] 按鈕。這個對話方塊提供一些進階設定 (參閱 [解壓縮路徑和選項] 對話方塊獲得更多資訊)。

您也可以選擇 [解壓縮成 <資料夾名稱>] 指令無需其他要求，解壓縮到建議的資料夾，或是 [解壓縮至此] 指令來解壓縮至目前資料夾。

注意，如果 [整合] 設定對話方塊的 [使用階層式內容功能表] 選項是選取的話，您必須打開 [WinRAR] 子功能表才能使用上述指令。否則它們位於上一層選單。

另外的方法是，使用滑鼠右鍵拖曳一個或多個壓縮檔案，將它們拖放到目標資料夾，然後在出現的功能表中選擇 [解壓縮至此]。


新手上路：如何使用 WinRAR 圖形介面模式壓縮檔案

首先，您必須執行 WinRAR。在 WinRAR 圖示上按兩下或是按「Enter」鍵。您也可以從 Windows [開始] 功能表啟動：按一下 [程式集] 然後 [WinRAR] 程式組，然後執行 WinRAR。

WinRAR 執行時，會顯示目前資料夾內的檔案和資料夾清單。您需要轉到含有要壓縮檔的資料夾。您可以使用 Ctrl+D，在工具列下面的磁碟機清單或按一下位於左下角的磁碟機小圖示，來改變目前的磁碟機。按退格鍵、Ctrl+PgUp、工具列下面的 [上移] 按鈕或者按兩下資料夾名稱 “…” 轉到上層目錄。在任何其他的資料夾上按 Enter、Ctrl+PgDn 或者按兩下都可進入該資料夾。Ctrl+\ 則會將根目錄或含壓縮檔資料夾設為目前資料夾。

當進入您需要處理檔案的所在資料夾時，選擇您要壓縮的檔案和資料夾。可以像 Windows 檔案總管或其他的 Windows 程式一樣，使用Shift + 箭頭鍵或是用滑鼠來完成選擇。另外，在 WinRAR 也能使用空白鍵或 Ins 鍵來選擇檔案。在數字鍵盤區的「+」和「-」則允許使用檔案遮罩來組合選擇檔案。

在選擇一個或多個檔案以後，在 WinRAR 視窗上按一下 [加入] 按鈕、按 Alt+A 鍵或在 [指令] 功能表 選擇 [加入檔案到壓縮檔] 指令。在出現的對話方塊內輸入目標壓縮檔名稱或者直接接受預設的檔案名稱。在這個對話方塊裡，您也可以選擇新壓縮檔案的格式 (RAR 或 ZIP)、壓縮程度、分割檔案大小和其他壓縮選項。這個對話方塊的詳細說明在 [壓縮檔名和參數] 對話方塊主題中。在建立壓縮檔案準備就緒後，按一下 [確定] 按鈕。

壓縮過程中，將會出現一個視窗顯示操作的狀態。如果您想中斷解壓縮的進行，在指令視窗按一下 [取消] 按鈕。您也可以按一下 [最小化] 按鈕將 WinRAR 最小化到工作列。壓縮完成後，對話方塊將會顯示並且新建立的壓縮檔案成為目前選定的檔案。

使用拖放的方法，在已存在的 RAR 壓縮檔案中加入檔案也是可行的。在 WinRAR 視窗選擇要處理的壓縮檔案，並在名稱上按 Enter 鍵 (或者按兩下)。RAR 將會讀取並顯示壓縮檔內容。現在您只需簡單的從其他程式將要加入的檔案拖曳到 WinRAR，就可以把檔案加入檔案到壓縮檔中。


新手上路：如何使用指令行壓縮檔案

壓縮檔案的一般指令行語法為：

WinRAR A [-開關] <壓縮檔> [檔案] [@檔案清單]

例如，如果您希望加入檔案 LETTER.TXT 到壓縮檔 LETTERS.RAR，輸入：

WinRAR A LETTERS.RAR LETTER.TXT

如果未指定壓縮檔案副檔名，WinRAR 就使用在壓縮設定中選定的預設格式。但是您可以指定 .RAR 或 .ZIP 副檔名來取代預設值。

下一個範例：加入全部 *.WAV 檔案到 RAR 結實壓縮檔 Songs:

WinRAR A -S Songs.RAR *.WAV

也可以在檔案內列出要解壓縮的檔案，而不是在指令行上逐一列出它們。這種情況下，必須在指令行指定包含需要壓縮的檔案的清單檔案名稱。在這個檔案名稱前加入符號 @ 作為標識。這樣，如果您建立一個檔案 Binaries，裡面含有字串 *.exe 和 *.com，然後執行指令：

WinRAR A TOOLS.ZIP @Binaries

加入本資料夾內所有 .EXE 及 .COM 檔，至 TOOLS ZIP 壓縮檔。

解壓縮期間，將會出現一個視窗來顯示操作的狀態。如果您希望中斷解壓縮的進行，在對話方塊按一下 [取消] 按鈕。您也可以按一下 [最小化] 按鈕將 WinRAR 最小化到工作列。如果解壓縮完成並且沒有錯誤，WinRAR 會自動關閉。如果發生錯誤，則會顯示錯誤診斷資訊視窗。

參閱指令行介面可以獲得指令和開關的詳細敘述。


新手上路：如何在檔案總管或桌面壓縮檔案

如果安裝 WinRAR 時，沒有停用 [整合 WinRAR 到系統介面] 選項，可以在 Windows 介面內直接壓縮檔案。在檔案總管或桌面選擇您要壓縮的檔案，以滑鼠右鍵在選定的檔案上按一下並選擇 [加入檔案到壓縮檔]。在出現的對話方塊輸入壓縮檔名或接受預設的名稱。您也可以選擇新壓縮檔案的格式 (RAR 或 ZIP)，壓縮程度，分割檔案大小和其他壓縮選項。這個對話方塊的詳細敘述於 [壓縮檔名和參數] 對話方塊主題。選擇完成後，按一下 [確定] 按鈕。壓縮檔案將會建立在與選定檔案相同的資料夾內。

您也可以選擇 [加入到 <壓縮檔名稱>] 指令來無需附加條件加入檔案到建議的壓縮檔案，這種情況下將會使用在 [壓縮設定檔] 對話方塊選定的預設壓縮設定。

注意，如果[整合] 設定對話方塊的 [使用階層式內容功能表] 選項是選取的話，您必須打開 [WinRAR] 子功能表才能使用上述的指令，否則它們位於上一層功能表。

另一個方法是，使用滑鼠將檔案圖示拖放到已存在的壓縮檔案的圖示上，檔案將被加入到這個壓縮檔中。


RAR 與 ZIP 的比較

WinRAR 可以建立兩種不同格式的壓縮檔：RAR 和 ZIP。下面敘述是兩種格式的比較：

ZIP 壓縮檔

ZIP 格式的最大優點是其普及性。例如，網際網路上的大部分壓縮檔案都是 ZIP 壓縮檔，所以如果您要發送壓縮檔給某人，但是您無法確定您的收件人是否有 WinRAR 來解壓縮時，使用 ZIP 格式是個好主意。或者您也可以發送自我解壓縮檔。這樣的壓縮檔案稍微大一點點，但是不需要外部程式就可以解壓縮。

ZIP 的另一個優點就是速度。ZIP 壓縮檔案通常比 RAR 在建立時間要快一些。

RAR 壓縮檔

一般而言 RAR 比 ZIP 提供更好的壓縮率，特別是在固實模式中。WinRAR 分割檔 的 RAR 模式提供更多的服務，例如建立自解檔等。

RAR 格式也有一些 ZIP 所缺乏的重要功能，例如修復記錄允許重組毀損資料，還能鎖定重要的壓縮檔案，來防止它們被意外地修改。

RAR 及 ZIP 格式都能管理幾乎大小毫無限制的檔案 (達到 8,589,934,591 GB)。


RAR 5.0 壓縮檔格式

WinRAR 5.0 為您介紹新版的 RAR 壓縮格式。

RAR 5.0 格式的新功能包括:

  • 64 位元 WinRAR 中，最大字典檔大小升格為 1 GB。壓縮大檔案時，尤其是結實模式，大字典檔通常能讓創造更高的壓縮率。
  • 加密基礎採用 AES-256 演算法，明顯比 RAR 4.x AES-128 強。
  • 修復記錄採用 Reed-Solomon錯誤更正代碼，比 RAR 4.x 的修復記錄更可靠。
  • 更快速進行 修復分割檔e操作。RAR 5.0 的 RAR+REV 分割檔總數從 255 升級到 65535。
  • 檔案時間以協調世界時間 (UTC) 記錄，不再 RAR 4.x 的當地時間記錄，以增加跨時區檔案交換時的便利性。
  • 為檔案資料提供 BLAKE2sp 雜湊選項。與 CRC32 雜湊運算不同，BLAKE2 更不可能出現不同的檔案但相同的雜湊值。因此 BLAKE2 能用於檔案辨認的目的。
  • 可選用快速開啟資訊加入壓縮檔中，存取壓縮檔內容更快速。
  • 解壓縮演算法支援多執行緒。壓縮率不佳的大檔案或含有 BLAKE2 雜湊驗算者，效果更明顯。
  • 支援 NTFS 再解析點、符號連結、永久連結。
  • 可以將第二個之後完全相同的檔案設定為參照第一個相同的檔案。
  • 完整 Unicode 支援。檔明及註解均以 big5 格式儲存。

有些 RAR 4.x 中短缺或不適宜的功能不再收錄於 RAR 5.0 格式:

  • 特殊演算法，包括文字壓縮、原始音訊、全彩壓縮、Itanium 執行檔壓縮等，無法適用於 RAR 5.0 壓縮檔。舊版 RAR 採用的原始音訊及全彩資料已經非常不普遍。純文字壓縮的效能在多核中央處理器中，已經比一般壓縮法的效能還低。即使這些格式在 RAR 5.0 已經不支援，最新版的 WinRAR 仍有能力解壓縮任何 4.x 壓縮檔，包含採用上述演算法者。RAR 5.0 仍然採用 Intel IA-32 執行及 delta 壓縮演算法，這些在現代的資料及硬體仍展現效率。
  • 不再支援以 archive.r00, archive.r01 等格式的分割檔。這些主要的目的在於與 MS DOS 檔案系統相容，但這些副檔名規則在 Windows 系統表現不佳，因為副檔名同時也代表定義檔案及檔案關聯。

舊版應用程式包含 WinRAR 5.0 之前的版本無法辨認 RAR 5.0 壓縮檔。因此如果您想確定壓縮檔能舊版軟體讀取，您可能需要選擇 RAR 4.x壓縮檔格式。在壓縮檔名及參數對話方塊或指令行的 -ma 開關可以加以指定。另外如果您需要特別的文字或多媒體壓縮演算法，或者舊式分割檔命名法，RAR 4.x 仍是您最好的選擇。


支援其他壓縮格式

除了完全支援 RAR 和 ZIP 之外，WinRAR 為其他壓縮工具所建立的 7Z, ARJ, BZ2,CAB, GZ, ISO, JAR, LZ, LZH, TAR, UUE, XZ, Z 檔案提供了基本的操作：檢視內容、解壓縮檔案、顯示註解和壓縮檔案資訊，您不需要任何外部程式來管理這些格式。支援多種類型 ZIPX 壓縮檔。

另外 WinRAR 也可以組合 .001, .002 之類副檔名的分割檔，您可以像一般壓縮檔一樣打開 .001 檔，然後解開內容。開始進行之前所有分割檔必須都放在同個資料夾內。


結實壓縮檔

結實壓縮檔案是用一種特殊壓縮方式壓縮的，把壓縮檔案中的部分或所有檔案當成一個連續資料流來看待。 結實壓縮只被 RAR 格式的壓縮檔支援，ZIP 壓縮檔案永遠是非結實的。 在壓縮對話方塊中使用建立結實壓縮檔選項，或 -s 指令行開關可以使用此功能。

結實壓縮檔在加入大量又小又類似的檔案時能明顯地增加壓縮率。不過也有一些限制：

  • 更新結實壓縮檔的速度較慢；
  • 從結實壓縮檔解壓縮單個檔案時，之前所有的檔案都需要經過分析。這使得從結實壓縮檔案中解壓縮檔案時會比普通壓縮檔案慢一些。但是，從結實壓縮檔案解壓縮所有的檔案時，解壓縮速度不受影響。
  • 如果結實壓縮檔案中的任何檔案損壞，要解壓縮損壞區域後面的所有檔案是不可能的。因此，如果結實壓縮檔案要儲存有潛在風險的媒體時，建議使用修復記錄。

結實壓縮適用於：

  • 壓縮檔案很少更新的時候；
  • 不需要經常從壓縮檔中解壓縮單個檔案或是部分檔案的時候；
  • 壓縮率比壓縮速度更重要的時候。

通常結實壓縮檔內的檔案以副檔名排序。不過也可以利用 -ds 開關來停用排序，或利用特定檔案 rarfiles.lst 來設定替代檔案順序。

分割檔案和自我解壓縮 (SFX) 也可以使用結實格式。

另請參閱：開關 -S，開關 -DS，rarfiles.lst


分割壓縮檔 (多片)

WinRAR 能將壓縮檔分成幾個小檔。這類檔案叫做多片，而每個組成的單位檔就叫做分割檔。一般而言分割檔的目的在於分裝在抽取式磁碟或用電子郵件傳檔。

WinRAR 能建立 RAR 及 ZIP 分割檔。

預設情況下，RAR 分割檔案以 "volname.partNNN.rar" 格式命名，NNN是分割檔案編號。RAR 4.x 壓縮格式可以使用 -vn 開關轉換為其他的副檔名命名規則，分割檔案組中第一分割檔案的副檔名是 .rar，後繼分割檔案從 .r00 到 .r99 命名。RAR 5.0 壓縮檔不支援 -vn 及副檔名計數規則。

RAR 分割檔也可以是結實和自解檔。第一個自解分割檔有不同的 (不是 .rar) 副檔名，例如，對於 Windows 自解分割檔是 .exe。

要解壓縮分割檔案，您必須從第一個分割檔案開始解壓縮。如果分割檔案儲存在例如硬碟等非可移動媒體時，在解壓縮之前，您必須將全部的分割檔案放在同一個資料夾內。

ZIP 分割檔長得像 'volname.zip', 'volname.z01', 'volname.z02'。在處理壓縮的過程中需要找到 ".zip" 副檔名的檔案作為起點，例如解壓縮或開啟壓縮檔。

跟 RAR 分割檔不同的是，ZIP 分割檔無法製成自我解壓縮格式。WinRAR 需要在處理建立或解壓縮 ZIP 分割檔時，所有的分割檔必須放在一起。因此無法建立或解壓縮分散在抽取式媒體中的檔案，您必須在一個資料夾中壓縮完所有檔案，然後再個別移動到抽取式媒體。相同地，要把所有檔案複製集合在一個資料夾中才能解壓縮。

在已經建立的分割檔案內不能再加入、更新或刪除檔案。您只能夠新建立分割檔。

從 3.40 版起，WinRAR 將分割檔編號放在 RAR 分割檔內。您可以利用顯示資訊指令來觀察分割檔的編號。這對檔名錯亂但需要手動整理時很實用。


修復分割檔

修復分割檔案或 .rev 檔案是由 WinRAR 建立的特殊檔案，允許重建分割檔案組中遺失及毀損的檔案。它們只能和分割壓縮檔一起使用。

這個功能對備份來說很有用，或者例如當您在新聞群組張貼一組分割壓縮檔，並且部分接收者沒有收部分檔案，重新張貼修復分割檔案來代替普通壓縮檔，可以減少重新張貼檔案的數目。

每個修復分割檔可以重建一個遺失的 RAR 分割檔。例如，如果您有 30 個分割檔，3 個修復分割檔，您可以重建任何 3 個遺失的分割檔。如果 .rev 檔案的數目少於遺失分割檔的數目，則不可能重建。RAR 4.x 普通分割檔和修復分割檔的總數不能超過 255，RAR 5.0 的限制則為 65535，並且修復分割檔的數目必須少於 RAR 分割檔的數目。

原始的 RAR 分割檔在建立修復區塊後不能更動。修復演算法同時使用位於 REV 檔案及 RAR 分割檔的資料來重建遺失的 RAR 分割檔。所以如果您變更 RAR 分割檔，例如：建立 REV 檔案之後鎖定檔案，修復處理會失敗。

進一步來說，RAR 5.0 修復分割檔也儲存服務資訊，例如保護的 RAR 檔之雜湊驗算值，因此會略大於其保護的 RAR 分割檔大小。如果您計畫要複製 RAR 及 REV 檔至抽取式磁碟，您必須將這部分考慮進去，將 RAR 分割檔大小指定成比媒體大小少幾個 KB。

當按一下 .rev 檔案或使用 rc 指令時 WinRAR 會重建遺失及毀損的分割檔案，或者如果在解壓縮時無法找到下一分割檔案並且發現可用編號的 .rev 檔案時自動重建。

您可以在壓縮檔名和參數對話方塊的選項中使用 [修復分割檔] 或在保護壓縮檔指令中相似的選項來建立修復分割。在指令行模式中，您可以使用 -rv 開關或 rv 指令。

原始毀損分割檔在重建前重新命名為 *.bad。例如，volname.part03.rar 會改為 volname.part03.rar.bad。


自我解壓縮檔 (自解檔)

自解檔 (SFX, SelF-eXtracting) 自我解壓縮檔是壓縮檔的一種，它嵌入用將壓縮檔解壓縮的可執行模組，這樣不需要外部程式來解壓縮自解檔，因為它本身就可以這麼做。不過 WinRAR 仍然可以像任何其他的壓縮檔案一樣處理自我解壓縮檔。所以如果您不想執行接收到的自我解壓縮檔 (例如，因為可能含有病毒)，您可以使用 WinRAR 來檢視或解壓縮它的內容。

自我解壓縮檔通常和其他的可執行檔案一樣有 .exe 副檔名。

自我解壓縮檔是很方便的，如果您想要將壓縮檔案給某一個人，卻不知道他們是否有合適的壓縮軟體來解壓縮檔案的時候。您也可以用自我解壓縮檔來發佈您自己的軟體，例如 WinRAR 的安裝程式就是基於圖形介面的 RAR 自解檔模組 Default.sfx。

要從指令行建立自我解壓縮檔，您可以使用 -sfx 開關來製作新的壓縮檔案，或是 S 指令來轉換已有的壓縮檔為自我解壓縮檔。在 WinRAR 圖形介面下，可以在建立新壓縮檔時，在 [壓縮檔名和參數] 對話方塊選擇 [建立自我解壓縮檔] 選項，或者打開既有的壓縮檔並按一下 [自解檔] 按鈕。

WinRAR 套裝軟體內包含許多用於不同軟體平台的自解檔模組，所有自解檔模組都有 .sfx 副檔名並且必須和 WinRAR 在相同的資料夾內。預設情況下 WinRAR 始終使用 Default.sfx 模組，但是您也可以在 [-sfx] 開關或 [S] 指令中直接指定其他的模組。例如，轉換 myarchive.rar 為自解檔格式，並使用 WinCon.SFX 模組來執行：

WinRAR SWinCon.SFX myarchive.rar

在 WinRAR 系統介面下，您可以選擇您想要使用的自解檔模組，在執行轉換壓縮檔成自解檔指令時，功能表就會出現。

下面是這些自解檔模組的有關資訊：

圖形介面 RAR 和 ZIP 自解檔模組 (Default.SFX 和 Zip.SFX)

指令行 RAR 自解檔模組 (WinCon.SFX)


加密

RAR 和 ZIP 兩種格式都支援加密功能。為加密檔案，在壓縮前您必須先指定密碼，或直接在壓縮檔名和參數對話方塊中指定，在指令行模式時使用開關 -p[密碼]。而在 WinRAR 圖形介面時，要輸入密碼您可以按 Ctrl+P 或者在 [檔案] 功能表選擇 [設定預設密碼]，或者按一下 WinRAR 視窗左下角的小鑰匙圖示。為了在 [壓縮檔名和參數] 對話方塊裡輸入密碼，在 [進階] 開關內按一下 [設定密碼] 按鈕。

和 ZIP 不同，RAR 格式允許不只加密資料，也可以加密壓縮檔案其他的敏感區域：檔案名稱、大小、屬性、註解和其他部分。如果您想這樣做，您需要在密碼對話方塊中設定 [檔名加密] 開關，或在指令行方式使用 -hp[密碼] 開關代替 -p[密碼]。在這種方式下，如果沒有密碼連檔案清單都不可能檢視。

結實 RAR 壓縮檔及具有檔名加密的壓縮檔只能使用同一個密碼。在非結實 RAR 壓縮檔內的檔案沒有對檔名加密者，以及在 ZIP 壓縮檔者，可以使用不同的密碼。

不再需要密碼的時候，不要忘記刪除輸入的密碼。否則您可能偶然又用這個密碼壓縮了別的檔案，而其實您並不想這樣。要刪除密碼，只需要輸入空字串來代替原來的密碼，或者關閉再重新啟動 WinRAR。有密碼存在時，鑰匙的圖示是紅色的，否則是黃色的。而且當您使用密碼進行壓縮操作時，[壓縮檔名和參數] 對話方塊的標題列會閃爍兩次。

如果您是在 [壓縮檔名和參數] 對話方塊直接輸入密碼，則不需要事後清除密碼。不同於其他方式，這樣的密碼只在單一壓縮操作內有效，並在完成後自動刪除。

如果您在密碼對話方塊中啟用 [適用於所有壓縮檔] 選項，而且輸入空白字串當作密碼，則解壓縮及測試指令會忽略加密的檔案及壓縮檔。在此模式下 WinRAR 狀態列不會顯示鑰匙圖示。

當解壓縮加密的檔案時，您不必在開始操作之前事先輸入密碼。當然您這樣做也可以。如果解壓縮前未事先輸入密碼，WinRAR 遇到加密的檔案，就會要求使用者輸入密碼。

RAR 壓縮檔在 RAR 5.0 是用 CBC 模式下的 AES-256 演算法加密，而 RAR 4.x 則在 CBC 模式下使用 AES-128 演算法加密。RAR 5.0 金鑰導出函式則基於 PBKDF2 使用 HMAC-SHA256。

B預設中，WinRAR 於 CTR 模式下使用 AES-256 加密 ZIP 壓縮檔，不過可能對某些舊的 ZIP 解壓縮程式不相容。如果需要跟舊式工具相容，您可以在密碼對話方塊中啟用 [ZIP 使用傳統加密法]，雖然不比 AES 強，起碼跟舊軟體相容性好。

即使 WinRAR 在 RAR 及 ZIP 格式可以使用 AES-256，但 RAR 在金鑰導出函式的選擇上更能讓 RAR 加密應用不易被暴力猜解攻擊，另外 RAR 也可以對檔名及其他檔案屬性加密。如果您要為敏感的資訊加密，最好選擇 RAR 壓縮格式。使用最少 8 位字元的密碼才真正安全。請避免使用一般的單字，以免讓密碼強度變弱。密碼是分大小寫的，最大的密碼長度為 127 字元。超過長度的密碼會截成這個長度。

如果關閉 [檔名加密] 選項，RAR 5.0 檔案的雜湊驗算則會根據密碼加以演算更動，避免從雜湊驗算值猜密碼。在短檔案及強式 BLAKE2 格外有風險。請不要寄望這種加密檔案的雜湊驗算會跟一般 CRC32 與 BLAKE2 值雷同。如果開啟 [檔名加密] 選項，雜湊驗證會忠實記錄，不會修改，因為只有密碼正確才能存取。

請記住，如果您遺失您的密碼，您將無法修復加密的檔案，就算是 WinRAR 的作者也無法解壓縮加密過的檔案。


壓縮檔註解

您可以加入選用的純文字資訊到 RAR 和 ZIP 壓縮檔案中。這些資訊叫做「壓縮檔註解」。在 WinRAR 圖形介面模式下為已有的壓縮檔案手動加入時，使用加入壓縮檔註解指令，在指令行模式要從檔案讀取註解則使用指令 [c] 或開關 -z<檔案>。

您也可以在壓縮檔案時，在 [壓縮檔名和參數] 對話方塊內直接指定註解。

如果壓縮檔案含有註解，並且在一般設定對話方塊的選項 [顯示壓縮檔註解] 為選取，則註解視窗將會顯示在檔案清單的右側。您可以用滑鼠拖曳左邊框來調整註解視窗的寬度。


保護壓縮檔避免損壞

RAR 壓縮格式支援一種特殊類型的冗餘資訊，叫做「修復記錄」。修復記錄會讓壓縮檔略大，但可以在磁碟失效造成的資料物理損壞或其他任何類型的資料遺失時，只要不嚴重，提供修復壓縮檔。這種損壞修復可以透過修復壓縮檔指令完成。ZIP 壓縮格式不支援修復記錄。

您可以在[壓縮檔名和參數] 對話方塊內設定 [放置修復記錄] 選項來放置修復記錄到壓縮檔案中。另一種方法是在預設的壓縮設定檔內設定 [放置修復記錄] 選項。這種情況下，在任何壓縮檔修改後均會放置修復記錄到壓縮檔中。

如果您想從指令行模式放置修復記錄，請閱讀 rr[N] 指令及 -rr[N] 開關。

RAR 5.0 修復記錄採用 Reed-Solomon 錯誤修正代碼。其對連續毀損的能力大約等於 RAR 4.x，能修復比修復記錄略小的大小，但在多處毀損區域的修復能力則遠比 RAR 4.x 記錄強。

RAR 4.x 修復區間長度為 512 位元組，最大修復區間為 524288。因此其有效大小及資料修復能力不超過 256 MB。若使用 RAR 5.0 格式，則修復記錄可以跟壓縮檔一樣大。

您可以在 [壓縮檔名和參數] 對話方塊內中的進階選項用百分比設定修復記錄大小，也可以從保護壓縮檔指令設定。越大的修復記錄得以修復越大的毀損區，但會增加壓縮檔大小，進行起來也慢些。通常合理的選擇是壓縮檔大小的 3 - 10%。因為服務資料的完整性，實際上的修復記錄大小只會大約相等使用者定義的百分比大小，越小的壓縮檔誤差越大。

要修復帶有修復記錄的損壞的壓縮檔，在 WinRAR 圖形介面模式應用 [修復] 指令，在指令行使用指令 [r]。修復後的壓縮檔案將會命名為 fixed.arcname.rar，其中 'arcname' 是原始 (毀損) 壓縮檔名。如果損壞的壓縮檔案不包含修復記錄，或者由於嚴重的損壞壓縮檔案未能完全修復時，開始第二階段。這個階段內只是重新建構壓縮檔案的結構，而且 CRC 驗證失敗的檔案是不能修復的，但是仍可能修復因壓縮檔案結構損壞後無法使用的未損壞的檔案。這只對非結實的壓縮檔非常有用。另外這個階段對壓縮檔中檔名加密者也無法使用，只有在存有修復記錄時才行。

這個階段完成後，重建的壓縮檔將存檔為 rebuilt.arcname.rar，其中 'arcname' 是原始壓縮檔名。

RAR 5.0 修復記錄更能抵抗修復記錄本身的毀損，局部的修復記錄能發揮局部的功能。請注意，[修復] 指令無法修復修復記錄中毀損的區塊，只能針對檔案資料毀損才有效。等壓縮檔順利修復，您可能需要重新為儲存的檔案建立修復記錄。

4.x 跟 5.0 的記錄遇到毀損的壓縮檔，只要資料位置沒有位移，都能有不錯的表現。如果您從毀損的儲存媒體中，使用特殊的軟體將資料複製出來，請儘量選擇能將毀損的區域用 00 或其他資料填補，不要將片段分別複製出來，因為這樣可以保存原始資料的位置。然而，如果資料已經發生位移，無論是合理長度的截斷或伸長，兩版本都能嘗試進行修復，而 RAR 5.0 修復記錄在處理截斷或伸長時比 RAR 4.x 表現得更有效率。


鎖定壓縮檔

RAR 壓縮格式支援壓縮檔案鎖定。WinRAR 無法修改鎖定的壓縮檔，所以請鎖定重要的壓縮檔以防止意外被 WinRAR 修改。這類的保護機制在批次對壓縮檔處理 WinRAR 指令時很實用。

這指令並不能防止其他工具或其他人蓄意竄改，這只是為了預防被 WinRAR 意外修改而已。

在 WinRAR 圖形介面模式使用 [鎖定壓縮檔] 指令或者在指令行使用指令 [K] 來鎖定壓縮檔。


如何選擇最佳化壓縮設定

建立新壓縮檔時，您在壓縮檔名稱及參數對話方塊中的一般選項可以看到一些壓縮參數。首先您必須選擇壓縮格式，可以是 RAR, ZIP 或 RAR4。如果您不確定接收您壓縮檔的人有沒有裝 WinRAR 或其他軟體來解壓縮 RAR，那麼選擇 ZIP 比較妥當。否則，建議選擇 RAR，因為支援更多功能、更高壓縮率。RAR4 是稍早 RAR 的格式，並不具有重要改變的特色，例如 AES-256 加密、更有效率的修復記錄、2013 年在 WinRAR 5.0 發表的 RAR5 大字典檔等。有些工具，包含 WinRAR 5.0 之前的版本都無法解開最新的 RAR 格式。如果您想建立相容性高的 RAR 壓縮檔，請選用 RAR4 選項。

無論選擇的壓縮格式是什麼，接下來您要選擇壓縮的方法。您可以在 [僅儲存]、[速度最快]、[速度快]、[一般設定]、[壓縮佳] 和 [壓縮最佳] 之中選擇其一。[壓縮最佳] 方式提供最高的壓縮比，但壓縮速度最慢， [速度最快] 壓縮率很差，但速度很快，[僅儲存] 不做任何壓縮將檔案合併成一個壓縮檔案。如果您的壓縮檔案是為了發佈或是長久儲存，您可能會忽略時間因素使用 [壓縮最佳] 的壓縮方法來盡可能減少壓縮檔案大小。但是如果您只是用來做日常備份，[一般設定] 壓縮通常是最佳的選擇。[速度最快] 可能是用於定時備份， [壓縮最佳] 適合網路傳送，[一般設定] 則在日常操作，如電子郵件比較方便。

如果您選擇 ZIP 壓縮格式，您的準備工作到此完成。選擇 RAR 及 RAR5 的話，還有兩個影響壓縮結果的重要因素要選擇：字典檔大小及結實壓縮。

壓縮字典檔是壓縮演算法中，用來尋找和壓縮重複資料特徵的記憶體。越大的字典檔通常對大檔能增進壓縮的效果，在結實壓縮模式尤其明顯，但也會降低壓縮速度、提高對記憶體的需求。一般來說，我們建議使用 RAR 格式使用 4 MB 的字典檔，RAR5 (RAR 5.0) 壓縮格式使用 32 MB。您可以在此閱讀更多字典檔的說明。

處理許多小檔案時，採用 [建立結實壓縮檔] 選項能將檔案壓縮成單一連續的資料流，提高壓縮率。可是在之後的變更壓縮內容時速度較慢，壓縮檔損毀時遺失資料的風險也提高。此模式在結實壓縮檔主題有詳細說明。

以上是所有會影響壓縮率及速度的主要設定。事實上，您不必每次壓縮都要設定一次。您可以在壓縮設定對話方塊裡的壓縮設定檔中設定喜歡的預設值。


WinRAR 介面簡介

此主題扼要地敘述 WinRAR 圖形介面的主要元件。

WinRAR 有以下選單：檔案、指令、工具、我的最愛、選項和說明。請選擇適當的主題來閱讀各個功能表的相關指令。

下一個介面元件是工具列，它位於功能表下面、檔案清單上面。工具列按鈕重複 [指令] 功能表的項目 (注意，這個功能表的所有功能還有鍵盤快速鍵)。在 WinRAR 顯示壓縮檔內容時，如果對應的壓縮檔案管理功能不適用於壓縮檔時，一些按鈕可能會被停用。如果您需要，您可以使用 [一般設定] 對話方塊或在工具列上用滑鼠右鍵按一下來選擇要顯示的按鈕、移去按鈕文字或縮小按鈕。

在工具列按鈕下面，您會看到 [上移一層] 的小按鈕和磁碟機清單， [上移一層] 按鈕改變目前資料夾到上一層目錄，磁碟機清單則用來選擇目前磁片或者其他如網路。您可以使用滑鼠或 F4 鍵打開它。 [上移一層] 按鈕和磁碟機清單也可以拖曳到工具列的右側。按 Ctrl+D 或按一下狀態列上的「磁碟機」小圖示也可以用於改變目前磁碟機。

檔案清單位於工具列的下面。它可以顯示目前資料夾未壓縮的內容，或者在 WinRAR 進入壓縮檔案時，顯示壓縮檔案內的檔案，這些也被稱為 檔案管理和壓縮檔案管理模式。每個檔案會顯示下列選項：名稱、大小、類型和修改的日期。壓縮的檔案還有兩個附加的選項 - 壓縮後的大小和雜湊驗算。雜湊驗算是一種基於檔案資料計算的特殊控制檢查和，並且可以用來說明檢測兩個壓縮的檔案是否相同而不必解壓縮他們。相同的檔案總有相同的雜湊驗算值。

所有的選項都整合進欄位中。按一下列標題，您可以改變檔案的排列順序 (標題欄上的藍色箭頭指示排序方向)，也可以利用滑鼠拖曳標題欄的分隔線來改變標題欄的寬度。有幾個附加的清單選項可在 [檔案清單] 對話方塊中使用。

如果壓縮的檔案被加密過，它的名稱後面會跟著星號。如果檔案延伸到下一個分割檔案，它的名稱後面會跟著 "-->"。如果檔案延伸自上一個分割檔案，它的名稱後面會跟著 "<--"。並且如果檔案延續在上一個與下一個分割檔案之間，它的名稱後面會跟著 "<->"。

在處理檔案之前，您必須先在清單內先選好。除了標準的 Windows 選擇檔案方式之外，WinRAR 又提供幾個按鍵用於選擇：空白鍵、Ins 鍵、數字鍵 +、數字鍵 -。更詳細的內容可以在主題選擇檔案中找到。

下列按鍵可以用於清單瀏覽。退格鍵 (BS)、Ctrl+PgUp 或在資料夾的 ".." 上按兩下，可以轉到磁片或壓縮檔案資料夾的上一層目錄。如果您正在檢視壓縮檔案的根目錄，相同的操作將會關閉壓縮檔案。按 Enter、Ctrl+PgDn 或在任何其他的資料夾上按兩下則進入該資料夾。同樣的操作用在壓縮檔名稱上時，則會打開這個壓縮檔。Ctrl+\ 則將磁碟根目錄或含壓縮檔資料夾設定為目前資料夾。

Ctrl+PgDn 可以將非壓縮檔副檔名的檔案當作壓縮檔開開看。例如，如果您想要刺探如果 EXE 檔是不是自解檔，不想執行它，您可以在名稱上按 Ctrl+PgDn，假如是自解檔的話，WinRAR 會顯示其內容。

如果您在檔案清單上按一下滑鼠右鍵，將會顯示包含檔案管理和介面指令的功能表。這些指令也可以利用WinRAR 一般功能表、工具列和鍵盤使用，所以您可以選擇對您而言最方便的任何一種方法。

WinRAR 視窗的左邊，在選項中啟用 [樹狀資料夾] 子選單後，能顯示樹狀資料夾面板。樹狀資料夾對您希望快速巡覽磁碟或壓縮檔資料夾時很方便。您可以利用滑鼠拖曳樹狀資料夾右邊的邊界來調整大小。

基於[一般設定] 對話方塊屬性頁 [顯示壓縮檔註解] 選項和打開的壓縮檔案是否含有註解，檔案清單的右側可能會被壓縮檔註解視窗所覆寫。您可以用滑鼠拖曳註解視窗的左框線，來改變註解視窗的寬度。

狀態列在檔案清單下面，WinRAR 視窗的底部。狀態列的左邊部分包含二個小圖示：「磁碟機」和「鑰匙」。利用按一下磁碟機圖示，您可以改變目前磁碟機。要更改目前的密碼，則在鑰匙圖示上按一下。這兩個指令也包含在 [檔案] 功能表。預設情況下的鑰匙圖示是黃色的，但是如果輸入密碼，圖示會變成是紅的。狀態列的中間部份顯示選定檔案的大小總計，或有關目前操作的資訊。狀態列右邊部份則顯示目前資料夾的檔案數量和大小。


檔案管理及壓縮檔案管理模式

WinRAR 圖形介面可以說是二種基本狀態之一：檔案管理模式或壓縮檔案管理模式。

在檔案管理模式，將會顯示目前工作資料夾的檔案和資料夾清單。您可以使用滑鼠或鍵盤等 Windows 常用的方式來選擇檔案和資料夾，以及執行不同的檔案操作，例如壓縮或者刪除。這種模式也可以對成組的壓縮檔案進行測試和解壓縮操作。

在壓縮檔案管理模式，將會顯示目前打開的壓縮檔案的壓縮檔案和資料夾清單，您也可以選擇檔案和資料夾，並執行壓縮檔案特定的操作如解壓縮、測試或註解。

在任何一種模式裡，您都可以更改目前資料夾 (實際的或壓縮過的)。按退格鍵、Ctrl+PgUp 或在資料夾 [..] 上按兩下，可以轉到磁碟或壓縮檔資料夾的上一層目錄。如果您正在檢視壓縮檔的根目錄，相同的操作會關閉壓縮檔案，並返回到 WinRAR 檔案管理模式。按 Enter 或 Ctrl+PgDn 或在任何其他的資料夾上按兩下則進入該資料夾。同樣的操作應用於壓縮檔案，就會打開這個壓縮檔案。Ctrl+\ 將磁碟的根目錄或含壓縮檔目錄設定為目前資料夾。

要進入 WinRAR 的檔案管理模式，只需簡單地在 WinRAR 圖示上按兩下啟動 WinRAR，或者在指令行執行 WinRAR 不加參數。

要進入 WinRAR 的壓縮檔案管理模式，先從檔案管理模式啟動 WinRAR，然後將游標移到想要處理的壓縮檔案上，並在壓縮檔名上按 Enter，或從 [檔案] 功能表單使用 [開啟壓縮檔] 指令。或者在 Windows 介面 (檔案總管或桌面) 內的壓縮檔案上按兩下來用 WinRAR 打開它。但是要有這樣的功能，WinRAR 必須在安裝時與壓縮檔案關聯 (它是預設的安裝選項)。您也可在安裝後使用 [整合] 設定對話方塊將壓縮檔案和 WinRAR 關聯。最後，如果在指令行以壓縮檔名作為唯一選項執行 WinRAR，也可以直接從指令行進入想要處理的壓縮檔。


選擇檔案

進行任何操作之前，您必須在 WinRAR 的檔案清單區，選擇要處理的全部檔案和資料夾。

如果您只需要選一個檔案，只要移動游標到那個檔案並開始操作。有很多種檔案的選擇方式和其他的 Windows 應用程式一樣，您可以按住 Shift 鍵，用箭頭鍵或滑鼠左鍵來選擇一組檔案。要選擇一些分散開的項目則按住 Ctrl 鍵，然後在每一個需要的功能上按一下。按 Ctrl+A 或者從[檔案] 選單使用 [全選] 指令，可以選擇目前資料夾下的全部檔案和資料夾。

所有上面涉及的標準選擇方法提供非連續性的選擇，如果您移動游標就可以取消選擇。雖然標準方法通常夠用，但有時連續性的選擇更方便，它允許在目前資料夾瀏覽，而不用取消上次標記選擇的檔案。WinRAR 為此提供一些按鍵

空白鍵，Ins 鍵 | 選擇游標所在檔案，並將游標往下移動。要取消選擇的檔案使用空白鍵，只需在名稱上再按一次空白鍵或 Ins 鍵或使用數字鍵的 [-] 指令。
數字鍵 * | 反轉目前選取的部分
數字鍵 + | 用輸入的檔案遮罩選擇檔案
數字鍵 - | 用輸入的檔案遮罩取消選擇檔案

如果在開始解壓縮或測試之前沒有選擇檔案，將會解壓縮或是測試所有壓縮的檔案，這條規則只在測試和解壓縮操作時有效。


面板

介面面板可以變更預設的 WinRAR 外表，以其他的圖片取代。面板散播係以 RAR 壓縮檔格式，並以".theme.rar" 副檔名為標準格式。您可以從 WinRAR 首頁 中的 "Themes" 頁面取得。要安裝新面板，只要像打開一般 RAR 檔案一樣在 WinRAR 開啟，例如，按兩下該圖示就可以。接著依照 WinRAR 的指示安裝。

已經安裝的面板清單列於 [選項] 功能表的 [面板] 子選單，選擇任一項目可以切換至該面板。此選單也有 [組合管理面板] 提供面板管理，及 [取得更多面板] 連結到面板網頁。

面板檔案儲存於 %APPDATA%\WinRAR 資料夾中的 "Themes" 資料夾。


精靈介面

WinRAR 的精靈介面是為初學使用者設計的，使用簡單的一步一步的方式執行基本的壓縮和解壓縮操作。

您需要按一下 WinRAR 工具列上的精靈按鈕來顯示精靈對話方塊。預設情況下，這個按鈕在壓縮檔案內部和外部都是可見的，但是您可以在 [一般設定] 對話方塊中的 [選擇按鈕] 中，像工具列中的其他按鈕一樣啟用或停用它。[啟動時顯示精靈] 允許 WinRAR 在啟動時自動執行精靈。

每一個精靈對話方塊上部都包含一個簡要使用說明，敘述對話方塊的內容和使用者可能的操作。您也可以按說明按鈕得到更詳細的使用說明。


精靈：選擇操作

在這裡選擇您要執行的操作。

如果您想解壓縮 RAR、ZIP 或者其他壓縮檔內容，選擇 [將壓縮檔案解壓縮]。例如，您用它來解壓縮從網際網路下載的檔案。

如果您要建立一個新的壓縮檔案並把一些檔案用壓縮的格式加進去，請選擇 [建立新的壓縮檔案] 選項。在利用電子郵件發送檔案或者複製檔案到外部磁碟前壓縮檔案應該很有幫助，它有助於減少檔案大小。

如果您想向已有的壓縮檔案中加入檔案而不是新建，選擇 [加入檔案到壓縮檔] 選項。

選擇好操作後，按對話方塊底部的 [下一步] 按鈕。如果您選擇 [建立新的壓縮檔案] 或 [加入檔案到已經存在的壓縮檔案]，您將看到 [選擇要加入的檔案] 對話方塊，在那裡您需要選擇您要壓縮的檔案。在選擇 [將壓縮檔案解壓縮] 的情況下，您會直接轉到下一個 [選擇壓縮檔案] 對話方塊。


精靈：選擇壓縮檔來解壓縮

這裡您需要選擇一個壓縮檔案來解壓縮。

按 [瀏覽] 按鈕，找到您的壓縮檔案，將游標移到它的名字上並按 [開啟]。同樣，您還可以將壓縮檔案的圖示拖放到這個對話方塊上，來代替使用 [瀏覽] 按鈕。

選擇好壓縮檔以後，按對話方塊下面的 [下一步] 按鈕。

注意在打開對話方塊時 WinRAR 會預測壓縮檔案的名字，並設定為桌面上已有的壓縮檔名之一。如果它確實是您要解壓縮的壓縮檔案，只需按 [下一步]，但是如果 WinRAR 預測錯誤，和上面敘述方法的一樣，只需選擇您想要的壓縮檔。


精靈：選擇壓縮檔

這裡您需要選擇一個壓縮檔來建立或更新。

如果您要建立新的壓縮檔案，通常 WinRAR 會給它建議一個名字。您可以接受這個名字，或輸入其他的名字。如果在 WinRAR 設定中的 [壓縮檔預設資料夾] 不是空白的，WinRAR 會根據這個資料夾建立檔案，否則不包含目錄及壓縮檔的名稱會建立在桌面上。如果您希望在其他的資料夾建立它，按 [瀏覽] 按鈕，找到放置壓縮檔的資料夾，在 [檔案名稱] 一欄內輸入壓縮檔案的名字並按 [開啟] 按鈕。

如果您想加入檔案到已有的壓縮檔案內，您也可以使用 [瀏覽] 來找到要更新的壓縮檔案或是拖放壓縮檔案的圖示到這個對話方塊上。

在您選擇好壓縮檔案的名字之後，按對話方塊底部的 [下一步] 按鈕。


精靈：選擇檔案解壓縮之資料夾

這裡您需要選擇一個資料夾來存放從壓縮檔案中解壓縮的檔案。

預設情況下 WinRAR 會根據設定裡面的 [壓縮檔預設資料夾] 內容建立，如果沒有設定，則在桌面上建立。您可以接受建議的名字，或者按 [瀏覽] 按鈕手動選擇資料夾。

在您選擇好資料夾的名稱之後，按對話方塊底部的 [完成] 按鈕開始解壓縮操作。


精靈：壓縮選項

這裡您可以指定一些附加的壓縮選項。

如果對於您來說較快的壓縮速度比壓縮比更重要，選用 [快速，但壓縮比低]。

如果您希望壓縮成功後刪除原始檔案，設定 [壓縮後刪除原始檔案]。

如果您需要建立自解檔壓縮檔，啟用 [建立自我解壓縮檔 (.exe)] 選項。這樣的壓縮檔案不需要 WinRAR 來解壓縮，它有 exe 的副檔名並且能夠執行 (在圖示上按兩下) 來解壓縮自身的內容。

如果您要對一個壓縮檔加密，請利用 [設定密碼] 按鈕。請務必記得密碼，如果忘了密碼是無法解壓縮的。

同樣，如果您建立一個新的壓縮檔案，您可以把它分割成幾個部分(叫做分割檔)。有些時候多個小檔案比一個大檔案可能會更方便。如果您想這樣做，只要在對話方塊下部的輸入區域內輸入單個部分大小的位元組數。只要選擇欄位右邊的下拉清單，就可以用 bytes, kilobytes, megabytes 或 gigabytes 來指定大小的單位。可使用十進位表示式。

如果您更新已經存在的壓縮檔，建立自解檔以及分割檔案的選項會停用。這只有在建立新壓縮檔時才能使用。

注意這個對話方塊內的所有設定都是選用，通常您可以使用它們的預設值。

選擇完成後，按對話方塊底部的 [完成] 按鈕開始壓縮操作。


檢視檔案

當您執行 [檢視檔案] 指令時，WinRAR 會在內部檢視工具視窗裡顯示游標所在檔案的內容，而不管檔案的內容或設定是什麼。但是如果您在檔案名稱上按 Enter 鍵，可能會有多種不同的結果。如果游標所在的檔案是壓縮檔案，WinRAR 將會打開它並且顯示它的內容，否則將根據在 [檢視工具設定] 對話方塊指定的設定決定進一步的活動。利用這個對話方塊，您可以強制 WinRAR 始終使用內部檢視工具、用外部檢視工具打開檔案、呼叫這種類型檔案的 Windows 相關程式，或者每次在檢視檔案之前，詢問執行上述的某個操作。

WinRAR 可用來檢視一般檔案，而不管在不在壓縮檔案裡面。如果呼叫外部程式來檢視壓縮的檔案，WinRAR 會解壓縮這個檔案到暫存資料夾，傳遞它的名稱給外部程式執行並等待外部程式中止。在這之後 WinRAR 會檢查檔案的修改的日期，如果發現檔案已更新，則提示要求更新壓縮檔案內的檔案，然後刪除含有解壓縮檔案的暫存資料夾。

注意，當在 .exe 副檔名的壓縮檔上按 Enter 鍵，上面提及的操作有小修改。這種情況下，WinRAR 不只解壓縮這個檔案，而是將整個壓縮檔內容解壓縮到暫存資料夾，然後執行這個可執行檔。後面的步驟則和上面所涉及的類似：WinRAR 將會等待可執行檔案離開，然後測試解壓縮的檔案的修改的日期，如果有所改變，或者建立新檔案時，則提示要求更新壓縮檔案，然後刪除暫存資料夾以及它的內容。這種處理 .exe 檔案的方式，允許程式從壓縮檔案內直接執行。例如，您可以使用這個安裝新的程式，而不必手動解壓縮封裝。只需要進入壓縮檔案，在 setup.exe 或 install.exe 程式上按 Enter 鍵即可。


內部檢視工具

內部檢視工具的指令。

選單/項目 | 快速鍵 | 功能
檔案/離開 | Alt+F4 | 從內部檢視工具離開
編輯/複製 | Ctrl+C | 複製選定的純文字至剪貼簿
編輯/全選 | Ctrl+A | 選擇檢視的所有純文字
編輯/尋找 | Ctrl+F | 在純文字中尋找字串
編輯/找下一個 | F3 | 尋找字串的下一個位置
檢視/以 Windows 文字檢視 | Ctrl+W | 使用 Windows 字元表
檢視/以 DOS 文字檢視 | Ctrl+D | 使用 DOS 字元表
檢視/以 Unicode 檢視 (UTF-16LE) |  | 以 UTF-16 低字元編碼的 Unicode 檢視文字
檢視/以 Unicode 檢視 (big5) |  | 以 big5 編碼的 Unicode 檢視文字
檢視/自動換行 | Ctrl+S | 切換文字自動換行
檢視/設定字型... |  | 設定檢視工具字型
說明/檢視工具說明 | F1 | 顯示內部檢視工具說明

要改變目前的字元表，您可以按一下檢視工具狀態列右邊部分，那裡會顯示目前的字元表名稱。預設的字元表可以在 [檢視工具設定] 對話方塊指定。


[加入檔案到壓縮檔] 指令

這個指令在檔案管理和壓縮檔案管理模式都可以使用。

當 WinRAR 瀏覽磁片上的檔案時，首先您需要選擇要壓縮的檔案和資料夾。然後使用 [指令] 功能表、工具列上的 [加入] 按鈕或鍵盤快速鍵 Alt+A 來執行 [加入檔案到壓縮檔] 指令，在 [壓縮檔名和參數] 對話方塊內選擇壓縮檔名和參數，並按 Enter 鍵開始壓縮。

在 WinRAR 顯示壓縮檔案內容時，您需要先執行 [加入檔案到壓縮檔] 指令，然後在出現的對話方塊內選擇檔案，並按上面所述設定壓縮檔案的名稱和參數。

指令行對應的指令：指令 [a]


[解壓縮至指定資料夾] 指令

這個指令在檔案管理和壓縮檔案管理模式都可使用。

在壓縮檔案管理模式，當 WinRAR 顯示壓縮檔內容時，首先您需要選擇要壓縮檔案和資料夾。然後使用 [指令] 功能表 、工具列上的 [解壓縮到] 按鈕或 ALT+E 鍵盤快速鍵執行 [解壓縮至指定資料夾] 指令。在 [解壓縮路徑和選項] 對話方塊中您可以指定解壓縮檔案的目標資料夾，需要的話，設定附加選項。對話方塊關閉後，開始解壓縮。

在檔案管理模式可以一次解壓縮幾個壓縮檔。通常這個操作和上一段的敘述相似，但不是選擇壓縮檔內部的檔案，而是您需要選擇 WinRAR 找到的壓縮檔及資料夾。如果找到任何壓縮檔，將會顯示 [解壓縮路徑和選項] 對話方塊。這個對話方塊關閉後，所有找到的壓縮檔內容都將被解壓縮。

指令行相當於：指令 [x]


[測試壓縮檔] 指令

這個指令在檔案管理和壓縮檔案管理模式都可使用。

在壓縮檔案管理模式下，WinRAR 顯示壓縮檔內容時，首先，您需要選擇要測試的被壓縮的檔案和資料夾。然後使用 [指令] 功能表、工具列上的 [測試] 按鈕或鍵盤快速鍵 Alt+T 來執行 [測試壓縮檔] 指令。

測試期間所發現的全部錯誤將會顯示在 [診斷資訊] 視窗。如果沒有檢測到錯誤，WinRAR 將會顯示一個符合的資訊。

在檔案管理模式，可以一次測試多個壓縮檔。通常這個操作和上一段的敘述相似，但不是選擇壓縮檔案內部的檔案。而是您需要選擇壓縮檔和 WinRAR 用來尋找壓縮檔的資料夾。尋找完成後，WinRAR 將測試所有找到的壓縮檔內容。

指令行相當於：指令 [t]


[檢視檔案] 指令

這個指令在檔案管理和壓縮檔案管理 模式都可以使用。它會在內部檢視工具打開游標所在的檔案。可以使用 [指令] 功能表、工具列上的 [檢視] 按鈕或是鍵盤快速鍵 Alt+V 來執行這個指令。

參閱： 內部檢視工具、檢視檔案


[刪除檔案] 指令

這個指令在檔案管理和壓縮檔案管理模式都可使用。在檔案管理模式時，它會把選定的檔案和資料夾刪除到資源回收筒，因此您還有機會修復意外刪除的資料。但在壓縮檔案管理模式時，選定的檔案和資料夾會從壓縮檔案內完全刪除，之後沒有任何修復的可能，因而這裡您一定要小心。可以使用 [指令] 功能表、工具列上的 [刪除] 按鈕或是鍵盤快速鍵 Alt+D 或 Del 鍵來執行這個指令。

在檔案管理模式，您可以永久刪除檔案。Shift+Del 會永久刪除檔案，不會先移到資源回收筒。Shift+Del 指令會將唯讀跟系統檔刪除，都不會顯示提示。此刪除指令可以用來刪除含有非標準檔名的資料夾，例如空格或小數點符號。通常刪除到資源回收筒這類的刪除法都無法刪除此類資料夾。

指令行相當於：指令 [d]


[重新命名] 指令

這個指令允許重新命名在游標下的檔案或資料夾，且同時在檔案管理模式及壓縮檔管理模式下皆適用。在壓縮檔中直接重新命名，支援 RAR 及 ZIP 格式。要執行此指令，可以從 [指令] 選單或按鍵盤上的 F2。

重新命名指令在多片分割檔案中執行有些限制。只有在出現於目前分割檔案中的壓縮檔可以重新命名。如果您要使用分割檔重新命名的功能，您必須要停用檔案清單設定對話方塊中，[設定] 對話方塊，開啟分割檔包含的必要檔案中，[接合分割檔內容] 項目。

選擇新檔名時請小心。如果包含檔案系統不支援的字元，則您可能無法繼續解壓縮重新命名的檔案。如果真的發生，就再改一次成合法的名稱。

指令行相當於：指令 [rn]


[列印檔案] 指令

這個指令提供列印游標下的檔案，包括在檔案管理及壓縮檔管理模式下都能進行。要執行此指令請用 [指令] 選單或鍵盤快速鍵 Ctrl+I。


[不經確認就解壓縮] 指令

這個指令在檔案管理和壓縮檔案管理模式都可使用。 如果 WinRAR 在壓縮檔案的內部，您需要選擇要解壓縮的壓縮檔和資料夾。如果您在檔案管理模式瀏覽未壓縮的檔案，則選擇尋找要解壓縮的檔案和資料夾。 然後使用 [指令] 功能表、工具列上的 [解壓縮] 按鈕 或 ALT+W 鍵盤快速鍵來執行 [不經確認就解壓縮] 指令。被選擇的檔案將被解壓縮至此或在 [路徑設定] 對話方塊中指定的解壓縮檔的預設資料夾中。如果您要指定不同的解壓縮資料夾或一些附加選項，請使用解壓縮至指定資料夾指令。

指令行相當於：指令 [x]


[加入壓縮檔註解] 指令

這個指令在檔案管理和壓縮檔案管理模式都可使用。如果您在壓縮檔案內，不需要選擇任何檔案，只需要使用 [指令] 功能表、工具列上的 [註解] 按鈕或鍵盤快速鍵 Alt+M 來執行 [加入壓縮檔註解] 指令，然後在出現的對話方塊內輸入壓縮檔註解。如果您在檔案管理模式瀏覽未被壓縮的檔案，首先要選擇需要加入註解的檔案和用來尋找壓縮檔的資料夾。

指令行相當於：指令 [c] ,開關 -z<檔案>


[保護壓縮檔避免損壞] 指令

這個指令在檔案管理和壓縮檔案管理模式都可使用。如果您在壓縮檔案內，不需要選擇任何檔案，只需要使用 [指令] 功能表 、工具列上的 [保護] 按鈕或 ALT+P 鍵盤快速鍵來執行 [保護壓縮檔避免損壞] 指令。如果您在檔案管理模式瀏覽未壓縮的檔案，首先選擇需要保護的檔案和用來尋找壓縮檔的資料夾。

這個指令加入修復記錄到目前打開或選取的壓縮檔。它可以在將來壓縮檔案資料有小規模的外力損壞時，幫助修復壓縮檔。這個功能只支援 RAR 壓縮檔。

如果打開的壓縮檔是分割檔序列的第一個檔案，您也可以為它建立修復分割檔。只需輸入要建立的 .rev 檔案的數量。您也可以在這個參數後附加一個百分符號，這種情況下建立的 .rev 檔案的數量將等於從 RAR 分割檔案的總數的百分比。

指令行相當於：指令 [rr] , 指令 [rv]


[鎖定壓縮檔] 指令

這個指令在檔案管理和壓縮檔案管理模式都可使用。如果您在壓縮檔案內，您不需要選擇任何檔案，只需要使用 [指令] 功能表、工具列上的 [鎖定] 按鈕或鍵盤快速鍵 Alt+L 來執行 [鎖定壓縮檔] 指令。如果您在檔案管理模式瀏覽未壓縮的檔案，首先要選擇需要鎖定的檔案和用來尋找壓縮檔的資料夾。

WinRAR 無法修改鎖定的壓縮檔，所以請鎖定重要的壓縮檔以防止意外被 WinRAR 修改。這類的保護機制在批次對壓縮檔處理 WinRAR 指令時很實用。

這指令並不能防止其他工具或其他人蓄意竄改，這只是為了預防被 WinRAR 意外修改而已。您可以鎖定重要的壓縮檔案以防止被意外的修改。這個功能只支援 RAR 壓縮檔。

指令行相當於：指令 [k]


[壓縮檔防毒] 指令

本指令在檔案管理及壓縮檔管理模式下皆適用。將壓縮檔解壓縮至暫存目錄，並以使用者電腦上安裝的防毒軟體檢查內容。在壓縮管理模式下，僅對目前開啟的壓縮檔進行處理，在檔案管理模式下則選定的檔案及資料夾都會處理。

本指令相關的對話方塊內容如：

WinRAR 找到防毒軟體

列出安裝在電腦上，並且 WinRAR 能辨識的防毒軟體。如果這清單包含一個以上的項目，您可以選擇一個。如果清單只有「使用者定義」項目，這表示 WinRAR 找不到防毒軟體，您必須自己指定防毒軟體名稱及執行參數。

防毒軟體名稱

防毒軟體執行檔名稱。您只有在 WinRAR 找不到安裝於電腦的防毒軟體，而且 [WinRAR 找到防毒軟體] 清單只有「使用者定義」項目時才需要修改。此時您需要按 [瀏覽] 按鈕並找到防毒軟體的 .exe 檔案，才能被 WinRAR 用來檢查解壓縮檔案。

防毒軟體參數

要傳遞給防毒軟體的參數。您只需要在 WinRAR 找不到防毒軟體或者傳送錯誤的參數時才需要修改。例如，防毒軟體改版時可能參數也會跟著改變。通常防毒軟體只需要一個參數，那就是包含解壓縮檔的資料夾名稱。WinRAR 將這個資料夾定義為 %f。既然名稱可能包含空格，您就必須要加上引號，例如 "%f"。有些防毒軟體可能需要更多的參數，這您可以從其相關文件中參考得知。

如果您只使用一種防毒軟體，也不想每次都修改參數，您可以忽略防毒軟體選擇對話方塊，方法是在 [安全性] 設定中取消 [建議選擇防毒軟體] 開關。

注意

  1. WinRAR 自己並不會防毒，它只能呼叫在您電腦上安裝的防毒軟體。如果您沒有安裝防毒軟體，您就無法使用此 WinRAR 指令;
  2. WinRAR 在完成這指令之前不會顯示訊息，您必須閱讀防毒軟體上的訊息來得知防毒結果;
  3. WinRAR 先解壓縮檔案到暫存資料夾再呼叫防毒軟體，所以您的磁碟空間一定要充足。WinRAR 在掃描完畢會刪除這些檔案;
  4. WinRAR 可以偵測許多知名的防毒軟體，所以您一般不必手動設定 [防毒軟體名稱] 及 [防毒軟體參數]。只要從對話方塊上選擇防毒軟體名稱並按 [確定] 就好了，只有在這個方法行不通時才需要設定其他兩個欄位;
  5. WinRAR 會記得參數設定，等下次使用時沿用。


[轉換壓縮檔] 指令

這個指令可以重新壓縮壓縮檔成其他壓縮格式。這可以在檔案管理以及壓縮檔管理模式下使用。在檔案管理模式您可以一次選擇多個檔案或資料夾進行處理，WinRAR 會掃描並處理找到的壓縮檔。在壓縮檔管理模式下，預設只有目前的壓縮檔會加以處理。[轉換壓縮檔] 對話方塊包含許多指令執行控制項目，如下所示:

要轉換的壓縮檔

準備被 WinRAR 轉換的壓縮檔清單。您可以按 [加入] 或 [移除] 來增刪項目。至於 [移除] 按鈕並不會真的從磁碟刪除檔案，只是從清單移除而已。

壓縮檔清單內容跟對話方塊參數下面的格式清單有關。

壓縮檔類型

您可以在這裡選擇要轉換哪些壓縮檔格式。

這個清單的壓縮檔可能跟著括號及數字，這表示找到多少這類型的壓縮檔並且可以進行轉換。例如，"zip(12)" 表示 WinRAR 找到 12 個 zip 壓縮檔。如果沒有這個數字，表示找不到這類的壓縮檔。

轉換開關/最低允許的壓縮率

這個開關允許指定轉換壓縮檔能接受最低 <新封包大小>/<舊封包大小> 百分比。例如，如果您設定至 100，WinRAR 會在新壓縮檔大於就壓縮檔時保存舊檔。如果停用，WinRAR 就會忽略壓縮檔大小。

轉換選項/壓縮設定

[壓縮設定] 按鈕會打開一個對話方塊，可以選擇其他壓縮參數。例如，您可以指定為 rar 或 zip。

轉換選項/壓縮檔轉換後儲存的資料夾

這裡您可以輸入一個資料夾來放置轉換的壓縮檔。如果欄位空白，新壓縮檔會放在跟舊壓縮檔相同的資料夾。

「儲存」按鈕

這個按鈕儲存大部分的對話方塊設定值，「要轉換的壓縮檔」清單除外。這會在下次打開對話方塊時重現這些這設定值。您可以使用這個功能儲存喜愛的設定。

備註

  1. WinRAR 只會在下列條件下保留新壓縮檔：檔案成功建立、測試並回報解壓縮檔案大小等於原始壓縮檔解壓縮大小時。
  2. WinRAR 會試圖保留壓縮檔註解。但如果使用者從 [壓縮] 按鈕打開的對話方塊選擇註解，則具有較高的優先權。檔案註解不會轉換。其他特殊壓縮檔資訊，例如 NTFS 資料流及檔案安全性資訊可能會轉換或忽視壓縮設定及壓縮檔格式。
  3. WinRAR 會先解封包到暫存資料夾才進行轉換。您必須確認磁碟空間足夠。
  4. WinRAR 可能無法轉換含有特殊資料，如連結或檔案資訊等的壓縮檔。


[修復壓縮檔] 指令

這個指令在檔案管理和壓縮檔案管理模式都可使用。當選擇的檔案或打開的壓縮檔是損壞的就嘗試修復它。使用 [工具] 選單、工具列上的 [修復] 按鈕或 Alt+R 鍵盤快速鍵來執行此指令。

WinRAR 只能修復 RAR 和 ZIP 壓縮檔案。WinRAR 會試圖使用壓縮檔資料和副檔名來自動偵測壓縮檔案的類型，但是使用者也可以自行設定壓縮檔類型。

原始壓縮檔不會改變，而操作結果會儲存到新的壓縮檔。新壓縮檔會命名為 fixed.arcname.rar 或 rebuilt.arcname.rar。其中 'arcname' 是原始壓縮檔名。

「修復」成功的條件取決於壓縮檔類型及毀損區域的大小。如果具有修復記錄，成功修復 RAR 壓縮檔的機會會大大提升。如果壓縮檔不含有修復記錄，則修復結實壓縮檔的機會更低，且對於檔名加密的壓縮檔毫無修復的機會。

壓縮檔案修復的詳細技術資料提供於指令 [r] 的敘述中（ [r] 是與 [修復壓縮檔案] 指令相當的指令行）。

指令行相當於：指令 [r]


[轉換壓縮檔成自解檔] 指令

這個指令在檔案管理和壓縮檔案管理模式都可使用。它轉換壓縮檔案成為自解檔。如果您已經進到壓縮檔內部，則不需要選擇任何檔案來執行操作，只需要使用 [工具] 功能表、工具列上的 [自解檔] 按鈕或鍵盤快速鍵 Alt+X 並從清單中選擇必要的自解檔模組來執行 [轉換壓縮檔成自解檔] 指令。如果您在檔案管理模式瀏覽未被壓縮的檔案，首先選擇需要轉換的檔案和用來尋找壓縮檔的資料夾。

如果壓縮檔已經是自我解壓縮檔，使用這個指令您也可以從壓縮檔案刪除已有的自解檔模組。這種情況下，WinRAR 不會改變原有的壓縮檔案，並會建立內容相同的新壓縮檔，只是不包含自解檔模組。

如果您選定 Windows 圖形介面自解檔模組這個預設的選項，您也可以按一下 [進階自解檔選項] 來設定預設目標路徑、標題和視窗純文字這樣的自解檔參數。閱讀進階自解檔選項主題可獲得關於它們的更多資訊。

這些主題包含關於在 WinRAR 中所提供的自解檔模組資訊：

圖形介面 RAR 和 ZIP 模組 (Default.SFX 和 Zip.SFX)

指令行 RAR 模組 (WinCon.SFX)

指令行相當於：指令 [s]


[尋找檔案] 指令

這個指令在檔案管理以及壓縮檔管理模式皆可執行。使用 [尋找檔案] 對話方塊可以在開啟的壓縮檔中或是指定的磁碟或資料夾尋找含有特定字串的檔案。對話方塊項目敘述如下:

尋找目標

預設值含有 "*"，這表示要找所有檔案。您可以在這裡輸入檔案遮罩，例如："*.txt" 來尋找 .txt 檔案。可以輸入空白來分隔一個以上的條件。如果您要指定含有空格的檔名，就用引號刮起來。

尋找的字串

在這裡輸入要尋找的檔案。如果留空白，WinRAR 會顯示所有符合其他條件的檔案。

大小寫視為相異

使用區分大小寫比較。

使用所有資料表

尋找字串時使用 ANSI、UTF-8、UTF-16 及 OEM (MS DOS) 字元表。如果關閉此選項，WinRAR 僅使用 Windows 預設字元表 (ANSI)。

使用十六進制搜尋

把輸入的字串當作十六進制數列，並以空白分隔。

搜尋範圍

在對壓縮檔內部搜尋時，這個選項限制至目前開啟的壓縮檔。壓縮檔外部則使用 [目前資料夾] 指搜尋當前資料夾。[選取項目] 對 WinRAR 檔案清單中指定的檔案及資料夾。在這些磁碟中選擇適當的磁碟名稱來搜尋。

壓縮檔類型

要尋找的壓縮檔類型。預設值含有 "*"，這表示「所有壓縮檔格式」，但是例如您可以輸入 "*.rar" 來尋找 RAR 壓縮檔。也可以輸入許多種壓縮檔格式，只要用空白分隔。

[在子資料夾中尋找] 選項

強制 WinRAR 不只在目前資料夾尋找，也一併尋找子資料夾。只對 [目前資料夾] 搜尋有效。

[在檔案中尋找] 選項

如果啟用，WinRAR 會在非壓縮檔案中根據指定的檔名尋找。

[在壓縮檔中尋找] 選項

啟用的話就會在壓縮檔中尋找。您可以同時選擇 [在檔案中尋找] 及 [在壓縮檔中尋找] 來尋找一般檔案及壓縮檔內容。

[忽略加密] 選項

如果加密的壓縮檔需要密碼，這類檔案就會自動忽略。

「儲存」按鈕

這個按鈕儲存這個對話方塊部分選項，會在下次打開對話方塊時重現這些這設定值。有些不會儲存，會用對當下搜尋最有利的條件。

指令行相當於: 指令 [i]


[顯示資訊] 指令

在 WinRAR 處於檔案管理和壓縮檔案管理模式的時候，這個指令都可以使用。只需要使用 [工具] 功能表、工具列上的 [資訊] 按鈕或鍵盤快速鍵 ALT+I 來執行 [顯示資訊] 指令。

在檔案管理模式，這個指令可以得到所選擇的檔案和資料夾的資訊：大小總計、檔案和資料夾的數量、壓縮檔案的數量。為了提高操作速度，壓縮檔案的檢測只是基於檔案副檔名，所以自解檔壓縮檔沒有統計。檔案掃描可能需要夠長的時間，可是如果您願意，任何時候您都可以關閉這個對話方塊。

磁碟空間是以固定大小的單元分配給檔案的，被稱為叢集。例如，如果叢集的大小是 4096 位元組，而您建立的檔案只有 1 個位元組的大小，實際上它將佔用 4096 位元組的磁碟空間。所以，為了給您關於檔案實際佔用多少空間和它們壓縮後可以節省多少空間的提示，所選檔案未填滿的叢集尾的實際大小，被稱為 [檔案損耗] - 這些叢集尾浪費的空間總計，資訊對話方塊也顯示目前磁片的叢集大小。

檔案掃描完成時，您可以按 [評估] 按鈕來獲得對所選檔案壓縮後的大小和壓縮時間的預測。此分析預想的條件是基於 RAR 最佳壓縮法，且假設磁碟速度夠快、磁碟資料交換時間短。壓縮評估乃快速且粗略的估計，請勿當作確切的時間。然而您可以用來參考壓縮這樣的資料值不值得花這樣的時間。如果您選擇 [自動啟動] 選項，則下次開啟此對話方塊十，估計時間會自動開始，不用再按 [評估] 按鈕。

掃描操作完成後，您也可以切換到這個對話方塊的其他選項頁，設定不同的壓縮選項，像註解、修復記錄、自解檔模組等等。它允許對包含在所選檔案和資料夾內所有的 RAR 和 ZIP 壓縮檔案執行必要的改變。不像掃描操作，這裡也可以處理自我解壓縮檔。謹慎使用這個操作，它可以一次改變成百上千個壓縮檔的參數。這個功能很強大，但是不正確使用時會變得相當危險。

在壓縮檔案管理模式，當您在壓縮檔案內部或是外部只選擇一個壓縮檔案時啟用 [顯示資訊]，WinRAR 將顯示關於壓縮檔案的下列資訊：

  • 壓縮檔名 (對話方塊標題)；
  • 壓縮檔案類型 (結實、自解檔、分割檔案) 和格式 (RAR、ZIP、CAB、ARJ、LZH 等)。所有這些參數組合成單一字串，顯示於對話方塊的頂部；

凡是由 WinRAR 3.40 或更新版產生的 RAR 分割檔，本字串也包含分割檔數目。這數目在遺失原始檔名而又要手動更正時很有用；

  • 解壓縮所需壓縮程式的最低版本。有些壓縮格式，如 ZIPX，此欄位也可能包含壓縮演算法；
  • 壓縮檔案建立時的作業系統；
  • 檔案總數；
  • 檔案未壓縮時和壓縮後的長度總計；
  • 整體的壓縮比；
  • 自解模組的大小，非自我解壓縮檔為 0；
  • 是否含有壓縮檔註解;
  • 是否存在加密的檔案；
  • 壓縮檔案是否鎖定;
  • 如果含有修復記錄，在最好情況下，能夠修復連續受損區域的最大值；
  • 用於壓縮檔案內任意檔案的字典檔大小的最大值；

如果壓縮檔案含有註解，就會顯示包含這個註解的附加資訊頁。

和檔案管理模式一樣，可以切換到對話方塊的其他頁並指定目前壓縮檔案的不同參數。其他頁只要按 [說明] 按鈕就可以閱讀關於它們的更多資訊。


[產生報表] 指令

在 WinRAR 處於檔案管理和壓縮檔案管理模式的時候，這個指令都可以使用。

在壓縮檔管理模式，本指令建立包含此壓縮檔完整檔案清單的報表，檔案的選擇則忽略。

在檔案管理模式報表僅針對選擇的項目。根據指令參數的不同，報表可能包括一般的檔案及選定壓縮檔的內容。如果您選擇資料夾，則 WinRAR 會處理其檔案及子目錄。

您可以修改下列項目改變報表格式：

報表存檔

這裡您可以輸入檔案名稱並儲存。如果不想存檔，您可以留空白。

列印報表

如果您想列印報表，則選本項目。

複製報表

如果您想複製報表至剪貼簿，則選擇此項目。這要花一些記憶體的空間，如果您要處理的是好幾 MB 的檔案，您要考慮這個問題，可能會降低操作的速度。

輸出格式 (HTML, Unicode 文字, 純文字)

選擇報表檔案的輸出格式。HTML 及 Unicode 文字 格式支援 Unicode，所以非英文語系的檔名及壓縮檔名能正確地顯示，純文字格式並不相容 Unicode，且可能破壞非英文文字。

如果選擇本項目，則報表會以 HTML 格式呈現，否則就是純文字檔。

排序依據 (原始順序、名稱、大小、壓縮大小、修改日期、雜湊驗證)

您可以選擇排序模式，或以「原始順序」不排序。

壓縮檔另外排序

如果選用此開關，則壓縮檔包含的檔案會單獨排序，所以在同一個壓縮檔內的檔案會放在報表裡的同一個群組。沒有選用此項目，則所有檔案打散，依序排序。

包含至報表/壓縮檔

這個選項只應用於檔案管理模式。如果啟用，WinRAR 會分析所有檔案，如果找到壓縮檔，則會將其內容包含進報表中。如果您希望得到您磁碟中的一般檔案，不需要壓縮檔的資訊，則停用此功能，可以加速操作時間。

包含至報表/一般檔案

這個選項只應用於檔案管理模式。如果啟用，WinRAR 會將一般檔案納入報表。如果您只要壓縮檔報表，就要停用此項。

包含至報表/壓縮檔名稱

如果啟用，報表就會在檔案群組之前顯示壓縮檔名。在某些特殊的時機您可能需要停用此開關，例如您要傳遞報表給外部的程式。

包含至報表/所有資訊

如果啟用，WinRAR 會將檔案數量及大小的總和放在報表後面。如果有選 [一般檔案] 選項，則只會計算一般檔案，否則壓縮檔內含檔案也會計算在內。若遇到分割檔，則會在第一個分割檔計算資訊，以避免重複計算。

包含至報表/檔案大小

包含未壓縮的檔案大小。

包含至報表/壓縮大小

包含壓縮後的大小。如果在 NTFS 磁碟下的檔案設定屬性為「壓縮」，則一般檔案大小可能不同於解壓縮大小。

包含至報表/檔案日期

包含檔案修改日期。不管系統設定為何，日期格式均為 YYYY-MM-DD hh:mm。

包含至報表/檔案雜湊驗證

包含檔案雜湊驗證至報表。此選項對壓縮檔及一般檔案皆有效。壓縮之檔案的雜湊驗證類型取決於壓縮檔格式及選項。一般檔案都使用 CRC32。使用於一般檔案會降低操作速度，每次都會讓 WinRAR 讀取檔案資訊並重新計算 CRC32。通常壓縮檔已經儲存上次計算雜湊驗證的結果，所以此選項不會延遲處理壓縮檔。

[儲存] 按鈕

使用 [儲存] 按鈕可以儲存設定為預設值，報表檔名例外。WinRAR 保留兩套設定，一個給壓縮檔案，一個給檔案管理模式。


[基準測試] 指令

使用 [基準測試] 指令，您可以在不同電腦比較 RAR 壓縮的效率。

這個指令隨機產生資料，包含特定的冗餘資料，增加處理器及記憶體的負擔。接著資料傳給 RAR 壓縮及解壓縮演算法，然後輸出解壓縮演算法與原始資料比對。如果找到任何差異，WinRAR 則在指令行視窗回報 "Errors found - Yes"，這類錯誤可能指出硬體的問題，如記憶體無法信賴等。WinRAR 也會顯示目前及結果的處理資料量及壓縮速度，KB/秒。您可以使用結果值來比對不同條件下 RAR 的效能。例如，當您要選購新電腦，想知道誰的壓縮效能好，就可以使用基準測試功能。只有以一般的壓縮演算法，以「最佳」模式、4096K 字典檔呼叫，其他的條件及演算法都停用，所以能測試最嚴峻的資料下，RAR 的壓縮效能。

使用 [多執行緒] 選項，您可以比較 RAR 壓縮演算法之單執行緒與多執行緒 (對多處理器架構最佳化) 的效能。基於其結果，您可以從 [一般設定] 對話方塊啟用或停用此功能。

從無到有填充壓縮索引參照需要花一些時間。速度的值在停止之前會一直變動，因此在啟動之後幾秒鐘，指令視窗才開始顯示當前速度。結果速度在收集到足夠統計到可信的數值後才會顯示，但不會有大改變。雖然來源資料的樣式是隨機的，但其冗餘的層級及其他參數都是一樣的。所以無論系統當時有沒有加重負載，指令不論執行多久，都會回報一致的速度。

不保證不同版本的 WinRAR 會回報相同的壓縮速度值。所以如果您要使用此指令來比較不同電腦，請確定參與測試的 WinRAR 都是同一版本。同時也建議您進行基準測試前先關閉其他應用程式。

基準測試指令不會自己停止，您必須手動中斷。它不會用到硬碟，所有的操作都在記憶體進行。


[檔案] 功能表

指令 | 快速鍵 | 功能
開啟壓縮檔 | Ctrl+O | 打開指定的壓縮檔。您也可以學習用其他方式來開啟壓縮檔。
另存壓縮檔 |  | 儲存 WinRAR 開啟的壓縮檔到另一個資料夾
變更磁碟 | Ctrl+D | 改變目前磁碟機
設定預設密碼 | Ctrl+P | 設定預設密碼。密碼必須輸入兩次以確保正確，這個密碼將會用於所有的壓縮和解壓縮操作。
複製檔案至剪貼簿 | Ctrl+C | 複製選取的壓縮或普通檔案至剪貼簿。例如，您可以在壓縮檔案內選擇一些檔案，按 Ctrl+C，在檔案總管內打開資料夾並按 Ctrl+V 來將選擇的檔案解壓縮到那個資料夾。您可以在文字編輯器中按 Ctrl+V，可以僅貼上檔名。
自剪貼簿貼上檔案 | Ctrl+V | 貼檔案到 WinRAR 來開始壓縮，所以您可以在檔案總管內選擇檔案並把它們貼上到 WinRAR 中來壓縮它們。
複製完整名稱到剪貼簿 |  | 只複製選擇檔案或資料夾的完整名稱到剪貼簿，不要複製檔案內容。
全選 | Ctrl+A | 選擇所有的檔案和資料夾
選擇群組 | 數字鍵 + | 選擇符合輸入的檔案遮罩的全部檔案和資料夾
取消選擇群組 | 數字鍵 - | 取消選擇符合輸入的檔案遮罩的全部檔案和資料夾
反向選擇 | 數字鍵 * | 反向選擇全部檔案和資料夾
離開 | Alt+F4 | 離開 WinRAR

取決於 [一般設定] 對話方塊中的 [保留壓縮歷程記錄] 選項，最近打開的一些壓縮檔案的名稱可以顯示在 [離開] 指令的下面。您可以利用它們在 WinRAR 內快速打開這些壓縮檔。


[指令] 功能表

功能 | 快速鍵
加入檔案到壓縮檔 | Alt+A
解壓縮至指定資料夾 | Alt+E
測試壓縮檔 | Alt+T
檢視檔案 | Alt+V
刪除檔案 | Del、Shift+Del
重新命名檔案 | F2
列印檔案 | Ctrl+I
不經確認就解壓縮 | Alt+W
加入壓縮檔註解 | Alt+M
保護壓縮檔避免損壞 | Alt+P
鎖定壓縮檔 | Alt+L


[工具] 功能表

功能 | 快速鍵
精靈 |
壓縮檔防毒 | Alt+D
轉換壓縮檔 | Alt+Q
修復壓縮檔 | Alt+R
轉換壓縮檔成自解檔 | Alt+X
尋找檔案 | F3
顯示資訊 | Alt+I
產生報表 | Alt+G
基準測試 | Alt+B


[我的最愛] 功能表

我的最愛選單包含使用者最常用的資料夾和壓縮檔案清單。您可以使用 [加到我的最愛] 指令來加入目前打開的壓縮檔案或資料夾及其敘述到清單中，也可用 Ctrl+F 的鍵盤快速鍵。敘述是選用的，如果存在，則 WinRAR 會顯示，否則就顯示檔名或資料名稱。

如果您從清單中選擇壓縮檔案或是資料夾，它將會被打開於 WinRAR。注意，您可以快速的打開我的最愛的第一個功能，而不需要打開功能表，您只需按 Ctrl+1 ... Ctrl+0 按鍵。Ctrl+1 會打開我的最愛第一個項目標壓縮檔案，Ctrl+2 - 第二個 ... Ctrl+9 - 第九個，Ctrl+0 - 第十個。

[組織我的最愛] 指令則允許您編輯/刪除我的最愛的項目，也可以將它們從清單中向上或向下移動。選擇項目，並按一下這些操作同等的任何一個按鈕即可。要刪除一個我的最愛除按一下 [刪除] 按鈕外，您還可以使用 Del 按鍵。


[選項] 功能表

在選單的 [設定...] 會啟動一個對話方塊，包含下列的 WinRAR 設定：一般設定、壓縮設定、路徑、檔案清單、檢視工具、安全性和整合。請選擇任何的主題來獲得詳細的內容。而 [設定...] 指令的鍵盤快速鍵是 Ctrl+S。

您可以匯出 WinRAR 設定到一個檔案，並在以後使用 [匯入或匯出] 子功能表的兩個指令匯入。該檔案名稱為 Settings.reg，並放在 %APPDATA%\WinRAR 資料夾，不過您也可以在 [儲存 WinRAR 設定] 或 [載入 WinRAR 設定] 對話方塊選擇其他的目錄。如果您重新安裝 Windows 或必須移動 WinRAR 到別的電腦時，從檔案還原設定值可減少設定 WinRAR 所需的時間。如果 WinRAR 在註冊表找不到設定值，且 Settings.reg 檔案存在 WinRAR 或 %APPDATA%\WinRAR 資料夾內，它將被自動匯入。這些指令在使用 WinRAR.ini 檔案 儲存設定時則不啟用。

在 [匯入或匯出] 子選單的 [建立 WinRAR.ini 檔案] 指令會建立新的 WinRAR.ini 檔案 並將 WinRAR 的設定從註冊機碼複製到此檔案。

[檔案清單] 子選單包含兩個選項群組。在所有壓縮檔及資料夾都顯示在同一清單時，[單層資料夾檢視] 指令 (Ctrl+H 鍵盤快速鍵) 可以切換於傳統樹型檢視及單層資料夾顯示之間。本功能只能在壓縮檔管理模式中使用。另一個選項群組是 [清單檢視] 及 [細節] 項目，控制顯示檔案清單。[清單檢視] 可以切換成多欄位並以檔名顯示，[細節] 則顯示檔案日期等其他資訊。

[樹狀資料夾] 子選單可以讓您打開或關閉樹狀資料夾面板。您可以單獨對檔案管理 [顯示磁碟資料夾] 子選單) 或壓縮檔管理模式 ([顯示壓縮檔資料夾] 子選單) 分別設定。另一個方法是用鍵盤按快速鍵 Ctrl+T。樹狀資料夾在您希望巡覽磁碟或壓縮檔磁碟時很方便。您可以拖曳樹狀資料夾右邊邊框來改變寬度。

[面板] 子選單提供可用的 WinRAR 面板清單。[組合管理面板] 指令提供管理面板的功能。[取得更多面板] 則引導您到提供面板的網頁。

[名稱編碼] 子選單 讓壓縮檔名以指定的編法解碼。

此功能表的另一個指令是 [檢視記錄]。在內部檢視工具中，它會打開存在於 %APPDATA%\WinRAR 目錄下的 rar.log 的內容。請注意，您必須在 [一般設定] 對話方塊中將 [記錄錯誤到檔案中] 切換成打開狀態，才能強制 WinRAR 寫入錯誤到記錄中。使用 [清除記錄] 功能表指令可以清除記錄的內容。記錄僅對註冊版才適用。


[說明] 功能表

選擇 [說明主題] 指令可以檢視 WinRAR 說明檔案的內容。

使用 [WinRAR 首頁] 項目則連接到 WinRAR 首頁，在此您可以下載最新版本的 WinRAR 和線上訂購您的共享軟體 WinRAR。

[關於 WinRAR...] 指令則會顯示包含版本和版權資訊的對話方塊。


如何從 Windows 圖形介面開啟壓縮檔

如果您在安裝 WinRAR 時，沒有將選項 [整合 WinRAR 到系統介面] 關閉的話，要從檔案總管或者桌面開啟壓縮檔給 WinRAR 則很容易。只需要在壓縮檔案圖示上按兩下就可以了。

在安裝之後，您也可以使用 [整合] 設定對話方塊來整合 WinRAR 到系統介面。


使用內容功能表

如果您在安裝 WinRAR 時，沒有將選項 [整合 WinRAR 到介面中] 關閉的話，有數個附加的項目會附加到標準檔案和資料夾的內容功能表中，它會在您在檔案總管或者桌面以滑鼠右鍵按一下檔案圖示的時候出現。

對於壓縮檔案，WinRAR 顯示的功能是： [解壓縮檔案] 和 [解壓縮成 <資料夾名稱>]，而 <資料夾名稱> 會以資料夾的實際名稱替換。這兩種指令都會呼叫 WinRAR 來解壓縮檔案內容，但是第一個指令允許您輸入目標資料夾以及一些在 [解壓縮路徑和選項] 對話方塊解壓縮時的選項。而第二個則執行解壓縮至此，而沒有附加的問題提示。當您解壓縮一組壓縮檔案時，內容功能表也將會包含「解開每個壓縮檔至個別資料夾」的功能，允許把每個壓縮檔內容放到單獨的資料夾中。

WinRAR 也可以修改要顯示的壓縮檔案資訊「屬性」功能，如果壓縮檔註解存在的話，利用顯示資訊指令，也可以顯示和類似的壓縮檔案資訊。

對於一般的檔案和資料夾，WinRAR 加入的功能是： [加到壓縮檔] 和 [加到 <壓縮檔名稱>]， [壓縮並發郵件]， [壓縮成 <壓縮檔名稱> 並發郵件]，在此 <壓縮檔名稱> 會以壓縮檔案的實際名稱來替換。這兩種指令都會呼叫 WinRAR 來加入選定的檔案到壓縮檔案，但是第一個指令允許您輸入壓縮檔名和一些在壓縮檔名和選項 對話方塊的壓縮選項，而第二個則開始加入到現行的壓縮檔案中，而沒有附加的問題提示。相同的，發郵件指令會壓縮選擇的檔案，並把它附加一個建立的壓縮檔案至電子郵件中，但是第一個允許設定附加選項。您需要有 MAPI 相容的電子郵件用戶端來使用這個選項 (大部分現代的電子郵件程式支援 MAPI 介面)。


滑鼠拖放支援

WinRAR 支援 Windows 便利的拖放操作。

如果在檔案管理模式時，拖曳單一壓縮檔案到 WinRAR 中，壓縮檔內容將會顯示，且 WinRAR 將會進入壓縮檔案管理模式。

如果在檔案管理模式，一個或是多個的非壓縮檔案拖曳到 WinRAR 中，WinRAR 將會提示輸入壓縮檔名，並加入這些檔案到壓縮檔案中。

如果在壓縮檔案管理模式，將一個壓縮檔拖放到 WinRAR 工具列或位址列，則會顯示該壓縮檔的內容。如果您想對當前瀏覽的壓縮檔加入其他檔案，則將檔案拖放到顯示的清單中就好了。然而，如果檔案不是壓縮檔，則拖放到工具列或位址列的結果跟拖放到檔案清單是一樣的。拖曳的檔案只對於是 RAR 和 ZIP 壓縮檔案時才有效。

不論目前的 WinRAR 模式和壓縮格式是怎樣，您都可以從 WinRAR 拖曳檔案到其他的程式。

如果您在安裝 WinRAR 時沒有關閉 [整合 WinRAR 到系統介面] 的選項，您可以在桌面拖曳檔案到 RAR 或 ZIP 圖示中，來加入檔案到壓縮檔中。如果您使用滑鼠右鍵並將之拖曳到目標資料夾時，選用在功能表出現的 [解壓縮至此] 來解壓縮全部的檔案到目標資料夾。如果您用滑鼠右鍵拖曳單一未壓縮檔案或數個檔案至目標資料夾，可以利用內容功能表中的 [加到壓縮檔] 及 [加到<壓縮檔名稱>] 指令來建立壓縮檔。


指令行語法

從指令行也可以執行 WinRAR 指令，一般的指令行語法敘述如下：

WinRAR <O> -<開關1> -<開關N> <壓縮檔> <檔案...> <@清單檔案...> <解壓縮路徑\>

指令 | 要 WinRAR 執行的字元組合指定功能。按這裡參閱 WinRAR 指令清單。
開關 | 切換操作指定類型，壓縮強度，壓縮檔案類型等等的定義。按這裡參閱 WinRAR 指令清單。
壓縮檔案 | 要進行的壓縮檔名。
檔案 | 要進行的檔案名稱。
清單檔案 | 清單檔案是包含要處理檔案名稱的純文字檔。檔案名稱應該從每一行的最前面寫起。可以在清單檔案中使用//字元後加入註解。例如，您可以包含兩列字串建立 backup.lst： c:\work\doc\*.txt //備份純文字文檔案 c:\work\image\*.bmp //備份圖片 c:\work\misc 並接著執行： winrar a backup @backup.lst 您可以在指令行中同時指定普通的檔案名稱和清單檔案名稱。
解壓縮路徑 | 只與 e 和 x 指令搭配使用，指出解壓縮檔案加入的位置。如果資料夾不存在時，會自動建立。

注意事項

a) 如果未指定檔案也沒有指定清單檔案，WinRAR 將會以預設的 *.* 執行全部的檔案；

b) 如果建立壓縮檔時未指定壓縮檔案副檔名，WinRAR 將會使用在壓縮設定中選定的預設壓縮格式。但您可以指定 .RAR 或 .ZIP 副檔名來替換；

如果解壓縮時沒有指定壓縮檔副檔名，WinRAR 會假設為 .rar，因此 * 表示所有以 .rar 為副檔名的檔案。如果您希望處理所有沒有副檔名的檔案，請利用 *. 遮罩。*.* 遮罩則選取所有檔案。您可以在大部分的操作中對壓縮檔名使用萬用字元，例如解壓縮、測試及其他，但在壓縮及刪除時不能使用萬用字元。

c) 在指令行所輸入的開關會替換相同的設定值；

d) 在指令 c、e、s、t、rr、k 和 x 可在壓縮檔名中使用萬用字元。如此可以用單一指令來處理超過一個以上的壓縮檔案，除此之外，如果您指定 -r 開關伴隨這些指令時，將會尋找在子資料夾中的壓縮檔案；

e) 某些指令和開關只應用在 RAR 壓縮檔案，有些則在 RAR 和 ZIP 都可使用，而某些則可應用在全部的壓縮格式。這一些都得看壓縮格式所提供的特性而定；

f) 指令和開關的大小寫是一樣的，您可以用大寫或者小寫來下指令。

g) 如果指令行的元件包含空白符號，請用雙引號括起來。

範例

  1. 將資料夾 "c:\latest data" 加到壓縮檔 Info.rar

WinRAR a Info.rar "c:\latest data"

  2. 將壓縮檔 Info.rar 解開至資料夾 d:\data

WinRAR x Info.rar d:\data\


指令行清單 - 按字母排序

a | 加入檔案到壓縮檔
c | 加入壓縮檔註解
d | 從壓縮檔案刪除檔案
ch | 變更壓縮檔參數
cv | 轉換壓縮檔
cw | 寫入壓縮檔註解到指定的檔案
e | 從壓縮檔案解壓縮，忽略路徑
f | 整理壓縮檔案中的檔案
i | 在壓縮檔中尋找字串
k | 鎖定壓縮檔
m | 移動檔案和資料夾到壓縮檔案
r | 修復受損的壓縮檔案
rc | 重建遺失的分割檔案
rn | 重新命名壓縮檔
rr[N] | 加入資料修復記錄
rv[N] | 建立修復分割
s[名稱] | 轉換壓縮檔案成為自我解壓縮檔類型
s- | 移除自解檔模組
t | 測試壓縮檔案
u | 從壓縮檔案中更新檔案
x | 以完整路徑名稱從壓縮檔解壓縮


指令：A - 加到壓縮檔

加入指定的檔案和資料夾到壓縮檔案中。此指令行相當於 加入。

注意：因為分割壓縮檔修改是停用的，此指令無法應用來更新分割壓縮檔，只能用於建立的時候。

範例：

a) 從目前資料夾加入全部 *.hlp 檔案到壓縮檔 help.rar 中

WinRAR a help *.hlp

b) 從目前資料夾和子資料夾壓縮全部檔案成為 362000 位元組大小、結實的、分割自我解壓縮檔 save.part1.exe，save.part2.rar，save.part3.rar 等，並在每一個分割檔案中放置修復記錄

WinRAR a -r -v362 -s -sfx -rr save

因為未指定檔案名稱，全部檔案 (*.*) 將會被加入。

c) 如果指定資料夾名稱，並結合引用開關 -r，這時整個資料夾和子資料夾的全部內容都會被加入檔案到壓縮檔中。下面的指令將會把資料夾 Bitmaps 中全部的檔案加入到 RAR 壓縮檔案 Pictures 中

WinRAR a -r Pictures.rar Bitmaps

當然這也可以使用一般格式用 Bitmaps\*.* 來代替 Bitmaps。


指令：C - 加入壓縮檔註解

此指令允許在壓縮檔案中加入註解 。RAR 壓縮檔案的最大註解長度是 256 KB，而 ZIP 壓縮檔案則為 32768 位元組。加入壓縮檔註解也可以利用使用壓縮檔案管理指令加入壓縮檔註解。

因為分割壓縮檔修改是停用的，所以註解無法應用在分割檔案壓縮。當建立分割檔案壓縮時，您可以使用開關 -z<檔案> 來加入註解到分割檔案壓縮。

範例：

  1. 加入註解到壓縮檔案 distrib.rar

WinRAR c distrib.rar

  2. 從檔案加入註解可以使用 -z<檔案> 開關。

WinRAR c -zinfo.txt dummy


指令：CH - 變更壓縮檔參數

這個指令可以用於大多數的壓縮檔變更開關，來變更壓縮檔參數。這尤其對一些沒有專用指令的開關例如 -cl, -cu, -tl

此指令無法對壓縮資料重新壓縮、加密或解密，也無法組合或建立分割磁碟。如果沒有與其他開關合用，則 [ch] 指令只會複製壓縮檔資料，不會變更。

範例:

設定壓縮檔時間與當中最新檔案一致

WinRAR ch -tl files.rar


指令：CV - 轉換壓縮檔

此指令提供 WinRAR [轉換壓縮檔] 的指令行介面。您可以用 -y 開關跳過 [轉換壓縮檔] 對話方塊，使用預設參數起始操作。使用 [轉換壓縮檔] 對話方塊中的 [儲存] 按鈕來修改預設參數。

範例:

用預設轉換參數轉換所有在 c:\files 資料夾內的 ZIP 壓縮檔

WinRAR cv -y c:\files\*.zip


指令：CW - 寫入壓縮檔註解到指定的檔案

寫入壓縮檔註解到指定的檔案。其格式由 -sc 開關決定。

範例:

  1. 儲存壓縮檔註解 arc 至 ASCII 檔案 comment.txt

WinRAR cw arc comment.txt

  2. 儲存壓縮檔註解 arc 至 Unicode 檔案 unicode.txt

WinRAR cw -scuc arc unicode.txt


指令：D - 從壓縮檔刪除檔案

從壓縮檔案刪除指定的檔案和資料夾。此指令行相當於壓縮檔案管理指令刪除。

注意：

  1. 如果這個指令移除壓縮檔裡所有檔案，則空壓縮檔也會移除。
  2. 這個指令無法用於分割檔，因為分割檔無法更動。

範例：

從壓縮檔 dummy.rar 刪除全部的 *.dmy 檔案

WinRAR d dummy.rar *.dmy


指令：E - 從壓縮檔解壓縮並忽略路徑

忽略路徑解壓縮的檔案到目前或指定的資料夾。此指令行對應的是壓縮檔案管理指令解壓縮至指定資料夾並在解壓縮路徑和選項對話方塊啟用 [不要解壓縮路徑] 的選項。

範例：

在目前資料夾，從全部的 RAR 壓縮檔案解壓縮所有的 *.doc 檔案到目前資料夾

WinRAR e *.rar *.doc


指令：F - 對壓縮檔內更新檔案

僅壓縮檔案中的檔案比加入的還舊時才更新。此指令不會加入新檔案到壓縮檔案中。指令行相當於加入檔案到壓縮檔並且在壓縮檔名和選項對話方塊選擇 [僅更新已經存在的檔案] 的更新模式。

因為停用分割壓縮檔修改，所以此指令無法應用在分割檔案壓縮。

另請參閱：指令 A - 加入檔案到壓縮檔


指令：I[i|c|h|t]=<字串> - 在壓縮檔中尋找字串

在壓縮檔中尋找字串，支援下列選用參數:

i 不區分大小寫尋找 (預設);

c 區分大小寫尋找;

h 十六進制尋找;

t 使用 ANSI、UTF-8、UTF-16 及 OEM 字元表;

如果沒有指定參數，可以使用簡化的指令語法 i<字串> 代替 i=<字串>

可以指定 't' 修飾詞與參數共用，例如 ict=字串 會使用以上參數字元表作大小寫區分搜尋。

範例:

  1. 對字串 "first level" 於磁碟 C 的 *.rar 壓縮檔內的 *.txt 檔案中做搜尋。

WinRAR "ic=first level" -r c:\*.rar *.txt

  2. 搜尋十六進制值 f0 e0 ae ae ab 2d 83 e3 a9，位於 e:\texts 資料夾的 RAR 壓縮檔。

WinRAR ih=f0e0aeaeab2d83e3a9 -r e:\texts\*.rar


指令：K - 鎖定壓縮檔

WinRAR 無法修改鎖定的壓縮檔，所以請鎖定重要的壓縮檔以防止意外被 WinRAR 修改。這類的保護機制在批次對壓縮檔處理 WinRAR 指令時很實用。

這指令並不能防止其他工具或其他人蓄意竄改，這只是為了預防被 WinRAR 意外修改而已。

此指令行相當於壓縮檔案管理指令鎖定壓縮檔。這只支援 RAR 格式的壓縮檔。

範例：

WinRAR k release


指令：M - 移動檔案及資料夾至壓縮檔

類似指令 a ，但在壓縮操作成功完成後，檔案和資料夾會被清除。此指令行相當於加入檔案到壓縮檔且在[壓縮檔名和參數] 對話方塊中啟用 [壓縮後刪除] 選項。

因為分割壓縮檔修改是停用的，所以此指令無法應用在更新分割檔案壓縮，只能建立。


指令：R - 修復損壞的壓縮檔

壓縮檔案修復由二個階段所組成。首先，損壞的壓縮檔案會掃描修復記錄 (參閱 rr 指令)。如果壓縮檔包含先前加入的修復記錄，而且損壞的資料部分是連續性的，並低於修復資訊裡記載的錯誤訂正碼，檔案成功重建的機會是非常高的。當此階段完成時，新的壓縮檔案將會建立，叫做 fixed.arcname.rar，其中 'arcname' 是原始 (毀損) 壓縮檔名。

如果損壞的壓縮檔案不包含修復記錄，或是如果壓縮檔案由於嚴重的損壞，而不能夠完全修復時，第二階段開始。在此階段期間，僅有壓縮檔案結構的重建，而要修復失敗雜湊驗證的檔案是不可能，但是它盡可能的從損壞的壓縮檔案架構中，可使用的部位來修復未損壞的檔案。通常這對結實的壓縮檔案是有用的，在損壞的結實壓縮檔案，通常僅第一個檔案可能在第二個階段期間被修復。另外這個階段對壓縮檔中檔名加密者也無法使用，只有在存有修復記錄時才行。

當此階段完成時，新的壓縮檔案將會建立，叫做 rebuilt.arcname.rar，其中 'arcname' 是原始壓縮檔名。

預設的情況，修復的壓縮檔會放在當下的目錄。您可以加上 destpath\ 參數來指定到其他目錄。

此指令行相當於檔案管理指令修復壓縮檔案。

範例：

修復 buggy.rar 並將結果放在 'c:\fixed' 路徑

WinRAR r buggy.rar c:\fixed\


指令：RC - 重新建立遺失的分割檔案

使用修復分割 (.rev 檔案) 重建遺失的分割檔案。您需要指定任何存在的分割檔案作為壓縮檔名，例如：

WinRAR rc backup.part03.rar

您可以在這裡讀到更多關於修復分割的資訊。


指令：RN - 重新命名壓縮檔

重新命名在壓縮檔內的檔名。這個指令支援 RAR 及 ZIP 格式。指令語法為：

winrar rn <壓縮檔名> <原始檔名1> <目標檔名1> ... <原始檔名N> <目標檔名N>

例如，下列指令：

WinRAR rn data.rar readme.txt readme.bak info.txt info.bak

在壓縮檔 data.rar 中將把 readme.txt 重新命名為 readme.bak 並把 info.txt 重新命名為 info.bak。

可以對原始檔明和目標檔名使用萬用字元來簡化重新命名，像是改變副檔名。例如：

WinRAR rn data.rar *.txt *.bak

將把所有的 *.txt 檔重新命名為 *.bak。

WinRAR 不會檢查目標檔名是否已存在壓縮檔中，所以必須避免檔名重複。特別是使用萬用字元時特別重要。這個指令有潛在的危險，因為用錯萬用字元會損壞所有的壓縮檔名。


指令：RR[N] - 加入資料修復記錄

選用，多餘的資訊 (修復記錄) 可加入到壓縮檔中，雖然微幅增加壓縮檔大小，卻能在磁碟發生問題或其他形式的資料遺失中修復壓縮檔，減少損失。這類修復毀損適用指令 "r"。ZIP 壓縮檔格式不支援修復記錄。

RAR 4.x 與 RAR 5.0 壓縮格式採用不同的修復記錄結構及演算法。

RAR 4.x 修復記錄以 XOR 演算法為基礎。您可以指定 4.x 修復大小以修復區間為單位，也可以用壓縮檔大小的百分比來算。要指定修復區間，只要將數字放在 'rr' 後面，例如 'rr1000' 指的是 1000 個區間。要使用百分比，則要在百分比數字後面附上 'p' 或 '%' 字元，例如 'rr5p' 或 'rr5%' 指的是 5%。請注意如果在 Windows 的 .bat 及 .cmd 檔案，必須使用 'rr5%%'，不能使用 'rr5%'，因為指令把 '%' 當作批次的參數，所以改用 'p' 不用 '%' 的話比較不會混淆。

RAR 4.x 修復區間長度為 512 位元組。如果毀損資料為連續，則每個區間可以協助修復 512 位元組的損毀資訊，不過這數值要是遇到多處損毀時會低一些。最大修復區間為 524288。

4.x 修復記錄的大小，大約是 <壓縮檔大小>/256 + <修復記錄區間數>*512 位元組

RAR 5.0 修復記錄採用 Reed-Solomon 錯誤修正代碼。其對連續毀損的能力大約等於 RAR 4.x，能修復比修復記錄略小的大小，但在多處毀損區域的修復能力則遠比 RAR 4.x 記錄強。

RAR 5.0 記錄不採用 512 位元組區間，您只能用壓縮檔大小的百分比來指定。只要是 RAR 5.0 格式，即便沒有出現 '%' 或 'p' 字元，RAR 仍會當百分比來處理；因此 'rr5' 跟 'rr5p' 都表示 5%。因為服務資料的完整性，實際上的修復記錄大小只會大約相等使用者定義的百分比大小，越小的壓縮檔誤差越大。

RAR 5.0 修復記錄大小無法超過保護的壓縮檔大小，所以您不能指定大於 100% 作為參數。越大的修復記錄，建立跟修復都越久。

RAR 5.0 修復記錄更能抵抗修復記錄本身的毀損，局部的修復記錄能發揮局部的功能。請注意，'R' 修復指令無法修復修復記錄中毀損的區塊，只能針對檔案資料毀損才有效。等壓縮檔順利修復，您可能需要重新為儲存的檔案建立修復記錄。

4.x 跟 5.0 的記錄遇到毀損的壓縮檔，只要資料位置沒有位移，都能有不錯的表現。如果您從毀損的儲存媒體中，使用特殊的軟體將資料複製出來，請儘量選擇能將毀損的區域用 00 或其他資料填補，不要將片段分別複製出來，因為這樣可以保存原始資料的位置。然而，如果資料已經發生位移，無論是合理長度的截斷或伸長，兩版本都能嘗試進行修復，而 RAR 5.0 修復記錄在處理截斷或伸長時比 RAR 4.x 表現得更有效率。

如果您單純使用 'rr' 指令，沒有帶參數，RAR 會將修復記錄大小定為壓縮檔大小的 3%。

此指令行相當於壓縮檔案管理指令保護壓縮檔防止損壞。

範例：

  1. 放置預設大小 (3%) 的修復記錄到壓縮檔 backup

WinRAR rr backup

  2. 加入資料修復記錄到壓縮檔 pictures 並設定它的大小為壓縮檔總大小的 5%

WinRAR rr5p pictures


指令：RV[N] - 建立修復分割檔案

建立修復分割 (.rev檔案)，以後可以在分割檔案組中重建遺失的檔案。

這個指令只對 RAR 分割壓縮檔案有效，您需要在群組中指定第一分割檔案的名字作為壓縮檔名。例如：

WinRAR rv3 data.part01.rar

選項 <N> 參數指定建立修復分割的數目並必須少於 RAR 分割檔案的總數。您也可以附加一個百分比符號或 'p' 字元到這個參數上，這樣建立的 .rev 檔案的數目將等於從 RAR 分割檔案總數獲得的這個百分比。 例如：

WinRAR rv15% data.part01.rar

您可以在這裡讀到更多關於修復分割的資訊。


指令：S[名稱] - 轉換壓縮檔至自解檔格式

這個指令會建立一個自我解壓縮檔 (SFX)，當執行時會解壓縮含在裡面的檔案。

您也可以製作自解檔當成多片分割壓縮檔的第一個序列，但必須注意，因自解檔模組的大小而會使檔案較大些。自解分割檔的建立可使用指令 a 並加上開關：-v<大小> -sfx，接著您不需要確認分割檔案的大小 - 第一個分割檔會自動以正確的大小來建立。

這個指令行相當於壓縮檔案管理指令把壓縮檔案轉換成自解檔格式。

範例：

WinRAR s diamant

預設 WinRAR 使用在 RAR 壓縮檔案的自解檔模組檔案為 default.sfx，它必須與 winrar.exe 存在於相同的資料夾中，而對於 ZIP 壓縮檔則使用 zip.sfx 模組。也可以在 [s] 指令中，指定替用的自解檔模組名稱。

例如，要加入指令平台自解檔模組 WinCon.sfx 則執行：

WinRAR sWinCon.sfx myinst


指令：S- - 移除自解檔模組

這個指令會從已存在的自我解壓縮檔 (SFX) 移除自解檔模組。

WinRAR 會建立新的不含自解檔模組的壓縮檔案，原有的自我解壓縮檔不會刪除。

範例：

WinRAR s- rarsetup.exe


指令：T - 測試壓縮的檔案

為了驗證指定的檔案，這個指令會執行虛擬檔案解壓縮，但不會寫入輸出資料流程。這個指令行相當於壓縮檔案管理指令測試檔案。

範例：

測試全部在磁片上的 *.rar 壓縮檔案

WinRAR t -r \*.rar


指令：U - 對壓縮檔內更新檔案

這個指令，就好像 指令 f 一樣。僅在如果壓縮檔案中的檔案比被加入的還舊時才更新，但不像 f 的地方是只會加入新的檔案。

這個指令行相當於加入檔案到壓縮檔並在[壓縮檔名和參數] 對話方塊中選擇 [加入並更新檔案] 的更新模式。

因為分割壓縮檔修改是停用的，所以這個指令無法應用在分割檔案壓縮。

另請參閱：指令 A - 加入檔案到壓縮檔


指令：X - 從壓縮檔解壓縮並使用完整路徑

以完整路徑解壓縮檔案和資料夾。儲存在壓縮檔案中的資料夾架構，將會完整的還原修復。此指令行相當於壓縮檔案管理指令解壓縮。

類似的方法有 指令 e，此指令可以解壓縮檔案到目前資料夾或者指定的資料夾。

例如，指令：

WinRAR x Fonts *.ttf

會從壓縮檔案解壓縮 *.ttf 字型檔案到目前資料夾，但下面指令：

WinRAR x Fonts *.ttf NewFonts\

會從壓縮檔案解壓縮 *.ttf 字型檔案到資料夾 NewFonts

上面的範例，您必須使用附加的倒斜線來表示目標資料夾。


開關清單 - 按字母排序

-- | 停止開關掃描
-@[+] | 停用 [啟用] 檔案清單
-ac | 在壓縮或解壓縮後清除存檔案屬性
-ad | 附加壓縮檔名到目標路徑中
-af<類型> | 指定壓縮格式
-ag[格式] | 以目前日期生成壓縮檔名
-ao | 加入有存檔案屬性設定的
-ap<路徑> | 設定內部壓縮檔案路徑
-as | 同步化壓縮檔案內容
-cfg- | 忽略預設設定檔及環境變數
-cl | 將檔案名稱轉換成為小寫
-cp<名稱> | 選擇壓縮設定檔
-cu | 將檔案名稱轉換成為大寫
-df | 壓縮後刪除壓縮檔案
-dh | 開啟分享的檔案
-dr | 刪除檔案至資源回收筒
-ds | 不排序壓縮的檔案
-dw | 壓縮後抹除檔案
-ed | 不加入空資料夾
-en | 不加入 [壓縮檔結尾] 區塊
-ep | 從名稱中排除路徑
-ep1 | 從名稱中排除主資料夾
-ep2 | 擴大成完整路徑
-ep3 | 擴大成完整路徑，包含磁碟機代號
-e[+]<屬性> | 設定排除或包含的檔案屬性
-f | 更新檔案
-hp[密碼] | 加密檔案資料和檔頭
-ht[b|c] | 選擇雜湊類型 [BLAKE2,CRC32] 位檔案進行雜湊驗算
-iadm | 要求以系統管理員身分存取
-ibck | 在背景執行 WinRAR
-ieml[.][位址] | 使用電子郵件發送壓縮檔案
-iicon<名稱> | 指定自解檔圖示
-iimg<名稱> | 指定自解檔標誌
-ilog[名稱] | 記錄錯誤到檔案中
-im | 顯示更多資訊
-inul | 關閉錯誤資訊
-ioff[n] | 關閉電腦
-isnd[-] | 控制通知音效
-k | 鎖定壓縮檔
-kb | 保留壞掉的解壓縮檔案
-log[格式][=名稱] | 將名稱寫至記錄檔
-m<n> | 設定壓縮方式
-m<n> | 指定壓縮格式的版本
-ma[4|5] | 設定進階壓縮開關
-md<n> | 選擇字典檔大小
-me[參數] | 設定加密參數
-ms[清單] | 指定檔案僅儲存
-mt<執行緒> | 設定執行緒數量
-n<檔案> | 進階篩選的檔案
-n@<清單檔案> | 從清單檔案讀取進階篩選遮罩
-oc | 設定 NTFS「壓縮」屬性
-oh | 儲存永久連結作為取代檔案的連結
-oi[-] | 儲存符合的檔案作為參照
-ol | 儲存符號連結當成檔案的替代連結
-or | 自動重新命名檔案
-os | 儲存 NTFS 資料屬性
-ow | 處理檔案使用者身分檢查資訊
-o[+|-] | 設定覆寫模式
-p[密碼] | 設定密碼
-qo[-|+] | 加入快速開啟資訊 [無|強制]
-r | 遞迴子資料夾
-r0 | 只遞迴與萬用字元匹配的子資料夾
-ri | 設定優先權及停頓時間
-rr[N] | 加入資料修復記錄
-rv[N] | 建立修復分割
-s | 建立結實壓縮檔
-s<N> | 以檔案數量建立結實群組
-sc<字元集>[物件] | 指定字元集
-se | 以檔案副檔名建立結實群組
-sfx[名稱] | 建立自我解壓縮檔
-sl<大小> | 處理比指定還小的檔案
-sm<大小> | 處理比指定還大的檔案
-sv | 建立獨立的結實壓縮檔案
-sv- | 建立相依的結實壓縮檔案
-s- | 停用結實壓縮法
-t | 壓縮後測試檔案
-ta[m,c,a,o]<日期> | 只處理指定日期之後修改的檔案
-tb[m,c,a,o]<日期> | 只處理指定日期之前修改的檔案
-tk | 保持原有壓縮檔案時間
-tl | 以最新的檔案設定壓縮檔案時間
-tn[m,c,a,o]<時間> | 處理較新於指定時間的檔案
-to[m,c,a,o]<時間> | 處理較早於指定時間的檔案
-ts[m,c,a,p][+,-,1] | 儲存或修復檔案時間 (修改、建立、存取、保留)
-u | 更新檔案
-v<n>[k|b|f|m|M|g|G] | 建立分割檔案壓縮
-vd | 建立分割檔案壓縮前清除磁片內容
-ver[n] | 檔案版本控制
-vn | 舊式分割檔命名法則
-vp | 每次分割檔案壓縮前暫停
-w<路徑> | 設定暫存檔所在的資料夾
-x<檔案> | 排除指定的檔案
-x@<清單檔案> | 使用指定的清單檔案來排除指定的檔案
-y | 假設全部的詢問回應皆為 [是]
-z<檔案> | 從檔案讀取壓縮檔註解


開關：-- - 停止開關掃描

此開關會告知 WinRAR 在指令行已沒有其他的開關。它是使用在，如果壓縮檔名或檔案名稱是從 [-] 字元開始的時候。沒有 [--] 開關時，則會將此類名稱當成開關來處理。

範例：

從目前資料夾加入全部檔案到結實壓縮檔 -StrangeName

WinRAR a -s -- -StrangeName


開關：-@[+] - 停用 [啟用] 檔案清單

WinRAR 把指令行參數以 '@' 字元起始者當作檔案清單。因此預設之下 WinRAR 遇到 '@filename' 參數時會企圖讀取 'filename' 檔案清單。不過要是 '@filename' 檔案不存在，WinRAR 則改認為參數為檔案 '@filename'，不再讀取檔案清單。

開關 -@[+] 允許對參數開頭為 '@' 字元者避免認知混淆。

如果您指定 -@，則所有此開關之後的參數會以檔名處理，不再認定為檔案清單。

如果您指定 -@+，則所有此開關之後的參數會以檔案清單處理，不再認定為檔名。

此參數不會影響在這之前的參數。

範例

測試壓縮檔 '@home'

WinRAR t -@ notes.rar @home


開關：-AC - 清除「保存」屬性

此開關是設計用於備份目的。當壓縮時使用此開關，在壓縮之後檔案的「保存」屬性將會被清除。或者如果是在解壓縮的時候，WinRAR 會清除解壓縮後檔案的「保存」屬性。此開關不會影響資料夾屬性。


開關：-AD[1] - 附加壓縮檔名

在解壓縮一組壓縮檔時，該參數可能很有用。預設情況下，RAR 會把所有的壓縮檔解壓縮到同一個目錄下，而使用這個參數可以把它們解壓縮到各自的目錄中。在目標目錄使用 -ad 開關、在壓縮檔路徑使用 -ad1 開關，得以建立分別目錄。目標目錄參數會忽略 -ad1 開關。

範例：

  1. WinRAR 將為在 'data' 下每一個未壓縮的壓縮檔案建立子資料夾。

WinRAR x -ad *.rar data\

  2. WinRAR 會遞迴掃描 'arc' 目錄，找 *.rar 壓縮檔，並在每個壓縮檔目錄建立子目錄。

WinRAR x -r -ad1 arc\*.rar


開關：-AF<類型> - 指定壓縮檔格式

這個開關在 WinRAR 指令行中允許定義新壓縮檔案類型 <類型> 開關可以是 'rar' 或 'zip'。

例如，'winrar a -afzip arc' 將建立 arc.zip 壓縮檔案。

這個開關只被 WinRAR 支援。指令行 RAR 不能建立 ZIP 壓縮檔案。


開關：-AG[格式] - 使用目前的日期時間產生壓縮檔名

當建立壓縮檔案時，以格式 [YYYYMMDDHHMMSS] 附加目前日期字串，這對於每日更新是有用的。

附加字串是由 [格式] 開關所定義，或者如果不存在時，則使用 [YYYYMMDDHHMMSS]。格式字串可以包含下列的字元：

Y | 年
M | 月
MMM | 純文字式的月份 (Jan，Feb，等)
W | 純文字星期 (星期以星期一開始)
A | 數字星期 (星期一為 1，星期日為 7)
D | 日(月)
E | 日(年)
H | 時
M | 分 (如果接續在時後面，則視為分看待)
I | 分 (不管小時的位置，視為分看待)
S | 秒
N | 壓縮檔編號。WinRAR 對既有的檔案尋找賦予的名稱，如果找到，則增加壓縮檔編號直到檔名唯一為止。建立分割檔時不支援 'N' 格式字元。 當處理非壓縮操作時，例如解壓縮，WinRAR 選擇目前存在的壓縮規則第一個未使用的名稱，或者沒有此壓縮檔存在時則設定 N 為 1。

每一個上述的格式字串各代表加入壓縮檔檔名的一個字元。例如，使用 WW 代表兩位數星期數，YYYY 定義四位數年份。

如果在格式化字串的第一個字元是 '+'，日期字串和基本壓縮檔名位置交換，所以日期將在壓縮檔名之前。

如果格式字串第一個字元是 'F'，則其餘字元指定預設格式字串給 -ag開關。這個 -agf<預設格式> 只有放到 rar.ini 設定檔或者 RAR 環境變數時才有特殊值。例如，我們設置 RAR 環境變數為 -agfYYYY-MMM-DD，則我們可以用 -ag 不帶變數，就假設為 YYYY-MMM-DD 格式字元。

格式化字串可以包含自訂的文字，該文字須包含在 '{?' 及 '}' 字元之間。這段文字會插入到檔名中。

其他字原則沒有改變，會加入壓縮檔檔名中。

如果您要更新已經存在的壓縮檔，請小心使用 -ag 開關。基於前次使用 -ag 的格式字串及時間的不同，所產生的壓縮檔跟現存的可能不一樣。要是這樣，RAR 會產生新的壓縮檔，不會處理已存在的檔案。您可以使用 -log 開關 來把產生的壓縮檔名寫到檔案，然後從檔案讀出來以備他用。

範例：

  1. 使用預設的 YYYYMMDDHHMMSS 格式

WinRAR a -ag backup

  2. 使用 DD-MMM-YY 格式

winrar t -agDD-MMM-YY backup

  3. 使用 YYYYMMDDHHMM 格式

winrar a -agYYYYMMDDHHMM backup

  4. 使用 YYYY-WW-A 格式，包含欄位敘述

winrar a -agYYYY{年}-WW{週}-A{工作週} backup

  5. 使用 YYYYMMDD 及壓縮檔編號。萬一一天使用多次 YYYYMMDD 格式遮罩，則建立唯一檔名。

winrar a -agYYYYMMDD-NN backup


開關：-AI - 忽略檔案屬性

解壓縮時使用此開關，WinRAR 不會引用儲存於壓縮檔內的檔案屬性。使用此開關，解壓縮出來的檔案會遵照作業系統預設該要賦予的屬性。影響保存、系統、隱藏及唯讀等屬性。

如果壓縮時使用此開關，預先定義的值，特別是檔案與資料夾會加以儲存，忽略實際的屬性。

解壓縮時，只支援 RAR 及 ZIP 格式。壓縮時只支援 RAR 格式。


開關：-AO - 使用「保存」屬性加入檔案

此開關是設計用於備份目的的。當壓縮時使用此開關，只會加入「保存」屬性的檔案到壓縮檔案中。此開關不會影響目錄屬性，因此無論目錄的屬性是什麼都會加入。如果想不處理所有目錄記錄，您也可以加入 -ed 開關。

範例：

加入磁碟機 C: 具有「保存」屬性的全部檔案到 'f:backup' 並清除檔案的「保存」屬性

WinRAR a -r -ac -ao f:backup c:\*.*


開關：-AP<路徑> - 在壓縮檔內設定路徑

當加入檔案到壓縮檔以及當解壓縮時從檔案名稱移除時，將會使用與此開關結合的路徑。

舉例來說，如果您希望加入檔案 readme.txt 到壓縮檔案 release 的資料夾 DOCS\ENG 中，您可以執行：

WinRAR a -apDOCS\ENG release readme.txt

或解壓縮 ENG 到目前資料夾：

WinRAR x -apDOCS release DOCS\ENG\*.*

只支援 RAR 及 ZIP 格式。


開關：-AS - 壓縮檔內容同步化

如果此開關使用於壓縮時，在目前加入的檔案清單中不存在的被壓縮檔案，將會從壓縮檔案中刪除。它可以很方便的與 -u 開關結合，用來同步壓縮檔案和壓縮的資料夾的內容。

舉例來說，在下面指令之後：

WinRAR a -u -as backup sources\*.cpp

壓縮檔案 backup.rar 將只會包含原始資料夾的 *.cpp 檔案，其他的全部檔案將會從壓縮檔案中刪除。它看起來就好像建立新壓縮檔案，但有一個重要的不同：如果從上次備份後沒有修改過的檔案，這項操作會比建立新壓縮檔案的操作快上許多。


開關：-CFG - 忽略預設設定檔及環境變數

這個開關告訴 WinRAR 忽略預設的壓縮設定檔選項、RAR 環境變數、壓縮檔預設資料夾、[整理密碼] 對話方塊中的「選擇適合壓縮檔」選項及其他儲存設定。


開關：-CL - 轉換檔名成小寫

當使用此開關時，從壓縮檔案解壓縮、加入檔案到壓縮檔、修改或更新壓縮檔案中的檔案的全部檔案名稱都將被轉換成為小寫。這有時可用於當從一個有區分大小寫的作業系統，移動壓縮檔案到另一個有區分大小寫的作業系統。舉例來說，從 Unix 下解壓縮，但壓縮檔案建立在 DOS 下。

範例：

從 port.rar 解壓縮全部的檔案並將名稱轉換成小寫

WinRAR x -cl port


開關：-CP<名稱> - 選擇壓縮設定檔

您可以利用此開關來載入存在WinRAR 壓縮設定檔的設定值。如果您的設定檔儲存選擇的檔案名稱，WinRAR 會壓縮指令行指定的檔案，同時也會處理設定檔指定的檔案。如果設定檔有包含壓縮檔名，則會用於壓縮處理，您不需要再於指令行指定壓縮檔名。

設定檔名稱分大小寫，大小寫不同排序的位置會不同。

範例

壓縮 *.txt 檔案，使用 "My Texts" 壓縮設定檔的設定值

WinRAR a "-cpMy Texts" texts *.txt


開關：-CU - 轉換檔名成大寫

當使用此開關時，從壓縮檔案解壓縮、加入檔案到壓縮檔、修改或更新壓縮檔案中的檔案的全部檔案名稱都將被轉換成為大寫。

範例：

從 port.rar 解壓縮全部的檔案並將名稱轉換成大寫

WinRAR x -cu port


開關：-DF - 壓縮後刪除檔案

移動檔案到壓縮檔。此開關結合指令 a 執行時的動作相當於指令 m。


開關：-DH - 開啟共享的檔案

允許處理由其他應用程式打開來寫入的檔案。

當應用程式允許檔案讀取權限，但所有檔案存取又被禁止，檔案開啟仍為失敗時，這個開關很有用。

此開關是有危險性的，因為它允許加入檔案到壓縮檔，而檔案可能正由其他應用程式進行修改中。使用時請小心。

如果未指定 -dh，則依據在壓縮設定檔的 [開啟分享的檔案] 開關設定而定。

範例：

WinRAR a -dh dbf *.dbf


開關：-DR - 刪除檔案至資源回收筒

壓縮後刪除檔案並移到資源回收筒。


開關：-DS - 不要對壓縮檔案排序

此開關只對結實 RAR 壓縮檔案有意義。結實壓縮檔案的壓縮比是依據檔案的順序而定的，預設的 WinRAR 加入到結實壓縮檔案的檔案是按副檔名排序的。您可以使用此開關 -ds 關閉此項排序，並試著設定更為最最佳化的檔案順序。通常類似的資料是被加入在一起的。

範例：

WinRAR a -s -ds tools *.com *.exe *.doc *.txt *.*

檔案將會以：*.com、*.exe、*.doc、*.txt、全部其他檔案類型的順序來加入。

注意：

檔案 rarfiles.lst 也可以用來定義結實壓縮檔案中的檔案順序


開關：-DW - 壓縮後抹除檔案

壓縮後刪除檔案。刪除之前先以零位元組資料複寫磁區位置，改變檔案大小，變更檔名為暫存檔，防止資料被救回。

請注意此方案適用於一般硬碟，但可能無法於固態儲存裝置取代檔案資料，因為 SSD 使用分層技術，用更複雜的資料處理方法。


開關：-ED - 不要加入空資料夾

這個開關指出資料夾記錄不存到建立的壓縮檔中。當解壓縮這類壓縮檔時，WinRAR 根據含有檔案的路徑建立資料夾。空資料夾的資訊不予記錄。除了名稱 (存取權、資料流等)，其他空資料夾的屬性也不紀錄。所以請在您不需要保留上列資訊時才使用此開關。

如果 -ed 與 m 指令或 -df 開關合用，WinRAR 不會移除空白目錄。


開關：-EN - 不要加入「壓縮檔結尾」區塊

不支援 RAR 5.0 壓縮檔。

預設情況下，RAR 在新建或更新壓縮檔案時，在結束時加入 [壓縮檔結尾] 區塊。它允許跳過像數位安全簽章等擴展資料，但是在一些特定條件下停用這些功能可能有用。例如，如果在一個壓縮檔案在兩個系統之間利用不可靠的連接傳遞，並且同時發送者在它裡面加入新檔案時，它可能對確認已經接受的檔案部分不會在傳送部分之間的另一個結束被修改很重要。

這個開關不能用在分割檔案上，因為壓縮檔結尾塊包含正確處理分割檔案的重要資訊。


開關：-EP - 排除檔名的路徑

包含此開關時，檔案在加入壓縮檔案時不會包含路徑資訊。這可能會發生到壓縮檔案內許多同名的檔案中。

如果在解壓縮時使用，會忽略解壓縮檔的路徑，讓所有檔案都放在相同目錄下。

範例：

從目前磁片壓縮全部的 *.bas 檔案而不含路徑。

WinRAR a -r -ep bsources \*.bas


開關：-EP1 - 排除檔案根據的資料夾

不儲存或解開在指令行所輸入的路徑。

範例：

  1. 全部在目錄 tmp 的檔案及目錄將會加入到壓縮檔 'test'，但不包含路徑 'tmp\'

WinRAR a -ep1 -r test tmp\*

 這相當於指令:

cd tmp

WinRAR a -r ..\test

cd ..

  2. 解壓縮符合 images\* mask 的檔案到 dest\ 目錄，但從建立的檔案移除 'images\' 目錄：

WinRAR x -ep1 data images\* dest\


開關：-EP2 - 展開路徑成完整路徑

當壓縮時僅儲存完整的檔案路徑 (除了磁碟機號與首碼的反斜線)。


開關：-EP3 - 展開路徑成完整路徑，包含磁碟機代號

本開關儲存壓縮時的完整路徑，包含磁碟機代號。磁碟機代號分隔 (冒號) 以底線替代。

如果您使用 -ep3 來解壓縮，會自動將底線變回冒號，來將解壓縮檔案還原回當初的目錄及磁碟。如果使用者也指定目的地路徑，則會被忽略。

當初壓縮時將 UNC 路徑從 \\server\share 轉成 __server\share，則在解壓縮時將會還原回原來的狀態。

此開關能協助您備份許多磁碟至一個壓縮檔中，例如，您可以執行：

WinRAR a -ep3 -r backup.rar c:\ d:\ e:\

來建立備份，而：

WinRAR x -ep3 backup.rar

來還原。

但是請注意您一定要確定解壓縮檔沒有包含惡意的程式才能用 -ep3。也就是說，請用於自己建立的壓縮檔才值得信賴。本開關能取代在您電腦任何路徑的任何檔案，一般來說適用於備份及還原的用途。


開關：-E[+]<屬性> - 設定排除或包含的檔案屬性

指定檔案排除或包含屬性遮罩。<atr> 是十進位，八進位 (以 '0' 前導) 或十六進位 (以 '0x' 前導) 的數字格式。

預設的狀況下，在 <屬性> 之前要是沒有 '+'，則該開關定義為排除。所以如果 bitwise 的結果及在 <atr> 和檔案之間屬性不為 0, 那麼檔案將不會處理。

如果存在 '+' 符號，則指定包含的遮罩。只有至少一個符合遮罩規定的屬性，該檔案才會處理。

在 Windows 版本，也可以使用代替數位的遮罩符號 D, S, H, 及 R 指示目錄及檔案的系統，隱藏，和唯讀屬性。給予的屬性順序並不重要。

可以在一個指令中同時指定 -e<屬性> 及 -e+<屬性>。

範例：

1) 只壓縮資料夾名稱，不要其內容

WinRAR a -r -e+d folders

2) 不要壓縮系統及隱藏屬性的檔案

WinRAR a -esh files

3) 不要解壓縮唯讀檔案

WinRAR x -er files


開關：-F - 重新整理檔案

可使用於壓縮檔案解壓縮或是建立時。指令字串 [a -f] 相當於指令 f。您也可以使用開關 [-f] 於指令 m。

如果開關 [-f] 使用於指令 x 或 e，此時僅舊檔案會被從壓縮檔案解壓縮的新版本給替換。壓縮後的檔案，沒有符合的未壓縮檔案，則不會解壓縮。

介面模式對等的開關是位於 [壓縮檔名和參數] 對話方塊的 [僅更新已經存在的檔案] 選項，以及 [解壓縮路徑和選項] 對話方塊的 [僅更新已經存在的檔案] 選項。

只支援 RAR 及 ZIP 格式。


開關：-HP[密碼] - 同時對檔案資料及檔頭加密

這個開關和 -p[p] 類似，但是開關 -p 只加密檔案資料，而使檔案名稱等其他資訊可見。這個開關加密所有包括檔案資料、檔案名稱、大小、屬性、註解和其他塊等所有可觀察壓縮檔案區域，所以它提供了更高的安全等級。

在壓縮檔案中使用-hp 加密，沒有密碼甚至不可能檢視檔案清單。

範例：

將加入檔案 report.txt 到加密的壓縮檔案 secret.rar 中，使用密碼 'fGzq5yKw'

WinRAR a -hpfGzq5yKw secret report.txt


開關：-ht[b|c] - 選擇雜湊類型 [BLAKE2,CRC32] 位檔案進行雜湊驗算

開關：-HT[c|s] - 選擇雜湊類型 [BLAKE2,CRC32] 位檔案進行雜湊驗算

RAR 壓縮檔中，每個檔案的正確性受到雜湊驗算的保護。

預設的情況下，WinRAR 使用 CRC32 函數來計算雜湊。RAR 5.0 壓縮檔格式也支援選用 BLAKE2sp 取代 CRC32 計算雜湊。

-htb 開關可以指定使用 BLAKE2sp，-htc 指定使用 CRC32 雜湊函數。既然 CRC32 是預設的演算法，您可以只將 -htc 用於取代 WinRAR 設定中指定的 -htb 設定值。

CRC32 的輸出為 32 位元長度。CRC32 屬性適合偵測大部分的意外資料錯誤，但不足以認證檔案資料。換言之，如果兩個檔案有一樣的 CRC32，並不能保證兩個檔案內容一致。

BLAKE2sp 的輸出為 256 位元。做為一個強式加密雜湊函數，比較能夠保證相同 BLAKE2sp 者為相同檔案。BLAKE2sp 錯誤偵測能力也比短式的 CRC32 強。

既然 BLAKE2sp 輸出比較長，-htb 開關運作的結果會讓檔案略大。

如果壓縮檔頭沒有加密 (沒有使用開關 -hp)，加密的 RAR 5.0 雜湊驗算會再利用特別的密碼運算法加以修改，避免使用雜湊驗算值猜密碼。請不要寄望這種加密檔案的雜湊驗算會跟一般 CRC32 與 BLAKE2sp 值雷同。

此開關只支援 RAR 5.0 格式，所以您需要使用 -ma 開關來調用。

-htb 為指令行使用，相當於 [壓縮檔名及參數] 對話方塊的 使用 BLAKE2 檔案雜湊驗算選項。

範例

使用 BLAKE2sp 的雜湊驗算將 *.lst 加入至 lists.rar

WinRAR a -ma -htb lists.rar *.lst


開關：-IADM - 為自解檔要求以系統管理員身分存取

如果您要此自解檔在 Windows Vista 及更新版本中執行時會要求以系統管理員身分存取，則設定此選項 -IADM。此選項不會改變在舊版 Windows 中的行為。

此指令行的開關相對於自解檔選項，[進階] 對話方塊 中的 [要求以系統管理員身分存取]。

範例

WinRAR a -sfx -iadm install.exe c:\data


開關：-IBCK - 在背景執行 WinRAR

當開始壓縮時，將 WinRAR 最小化放到工作列指示區。

介面模式對等的開關是位於 [壓縮檔名和參數] 對話方塊的 [背景壓縮] 開關，及 [解壓縮] 對話方塊中的 [背景解壓縮] 選項。


開關：-IEML [.][電子郵件地址] - 利用電子郵件傳送壓縮檔

附加一個使用 [加入] 指令建立或更新的壓縮檔到電子郵件中。您需要有 MAPI 相容的電子郵件用戶端來使用這個開關 (大部分現代的電子郵件程式支援 MAPI 介面)。

您可以在開關中直接輸入詳細電子郵件位址或留為空白。在以後可以由您的電子郵件程式詢問。

如果您附加一個‘.’字母到 -ieml，成功附加到電子郵件中後壓縮檔案會被刪除。

如果建立分割壓縮檔案使用這個開關，每一分割檔案都附加單獨的電子郵件。


開關：-IICON - 指定自解檔圖示

為建立或更新的自解檔指定圖示。參數 <名稱> 是 .ico 檔名。使用 -iicon，不能搭配其他壓縮程式的自解檔模組。

這個指令行開關相當於 [自解檔選項：文字及圖示] 對話方塊 [從下列檔案載入自解檔圖示] 選項。

範例:

1) 加入 c:\myfiles 資料夾的內容至 setup.exe 自解檔，使用 c:\myicons\ver1.ico 為自解檔圖示

WinRAR a -sfx -iiconc:\myicons\ver1.ico setup.exe c:\myfiles

2) 放置此資料夾的 ver2.ico 到已經存在的自解檔 setup.exe

WinRAR s -iiconver2.ico setup.exe


開關：-IIMG<名稱>

開關：-IIMG<名稱> - 指定自解檔標誌

給建立或更新的自解壓縮檔指定點陣圖檔作為顯示的標誌。<名稱> 參數是 .bmp 檔案的名稱。

請不要使用其他廠商提供的 SFX 自解模組。

這個指令行開關相當於 [自解檔選項：文字及圖示] 對話方塊中的 [從檔案載入自解檔標誌] 選項。

預設的自解檔標誌大小是 93x302 像素。建議您使用相同或更小的點陣圖。

範例

  1. 加入 c:\myfiles 資料夾的內容至 setup.exe 自解檔，並使用 c:\pictures\logo1.bmp 作為自解檔標誌

WinRAR a -sfx -iimgc:\pictures\logo1.bmp setup.exe c:\myfiles

  2. 利用當前資料夾中的 logo2.bmp 取代已存在的自解檔 setup.exe 的標誌

WinRAR s -iimglogo2.bmp setup.exe


開關：-ILOG[名稱] - 將錯誤訊息寫入檔案

把錯誤資訊寫到 RAR 目錄中的 rar.log 檔案中。您可以在 [選項] 功能表 中使用 [檢視記錄] 檢視這個檔案的內容。也可以在開關中指定其他的記錄檔案名稱代替預設的 rar.log，例如， -ilogc:\log\backup.log。 如果指定的檔案名稱不包含路徑，記錄檔案將在 %APPDATA%\WinRAR 目錄中建立。

如果 [一般設定] 對話方塊中選項 [記錄錯誤到檔案中] 啟用，無論有沒有 -ilog 開關，錯誤資訊都會寫到 rar.log 中。

日誌檔採用 UTF-16 低字元編碼。

預設的情況下，日誌檔採用 UTF-16 低字元編碼，但可以使用 -sc<字元集>g -sc<字元集>g 來修改，例如 -scag 使用原生單位元編碼。


開關：-IM - 顯示更多資訊

在指令行模式中顯示更多資訊。現在只能跟 t 指令共同操作，讓壓縮檔測試成功也能回傳訊息。沒有附帶指令 "t" 的話，沒發生錯誤就安靜結束。


開關：-INUL - 停用錯誤訊息

停用 WinRAR 錯誤資訊。


開關：-IOFF[n] - 關閉電腦

操作完畢後關閉電腦。

使用 -ioff 或 -ioff1 關閉電腦，-ioff2 進入休眠，-ioff3 進入睡眠，-ioff4 重新啟動電腦。硬體必須支援相對應電源管理功能才行。

如果許多 WinRAR 檔案都使用此開關啟動，則電腦會在最後一個工作結束後關閉。


開關：-K - 鎖定壓縮檔

WinRAR 無法修改鎖定的壓縮檔，所以請鎖定重要的壓縮檔以防止意外被 WinRAR 修改。這類的保護機制在批次對壓縮檔處理 WinRAR 指令時很實用。

這指令並不能防止其他工具或其他人蓄意竄改，這只是為了預防被 WinRAR 意外修改而已。

範例

將 srcfiles 加到 final.rar 且鎖定產生的壓縮檔。

WinRAR a -k final.rar srcfiles


開關：-KB - 保留解壓縮不完整的檔案

此開關關閉 WinRAR 在解壓縮後移除損壞的檔案動作。


開關：-LOG[格式][=名稱] - 將名稱寫至記錄檔

此開關允許寫壓縮檔及一般檔名至指定的文字檔，用於壓縮、解壓縮、刪除、列出清單等指令。其行為定義於 '格式' 字串，能複選包含以下的字元:

A | 將壓縮檔名稱寫至記錄檔。如果 RAR 建立或處理分割檔，則所有分割檔名都會記錄。
F | 將已處理的檔名寫至記錄檔。包含加入壓縮檔的檔案，解壓縮、刪除或列出壓縮檔內的檔案。
P | 如果指定的記錄檔名稱已經存在，則將記錄附加在此檔，而非新建一個。
U | 以 Unicode 格式寫資料。

如果既沒指定 'A' 也沒指定 'F'，則會指派使用 'A'。

'名稱' 參數允許指定記錄檔名稱。格式一定要始於 'fmt' 字串，分隔於 '=' 字元。如果不存在 '名稱' 參數，RAR 則使用預設的 rarinfo.log 檔名。

可以在相同的指令行指定多個 -log 開關。

當您批次用 -ag 或 -v 開關於指令碼時，此開關的搭配越顯有價值。您可以在建立壓縮檔時指定 -loga=arcname.txt，然後使用適合的指令從 arcname.txt 讀取 RAR 產生的壓縮檔名。例如，於 Windows 批次檔可以使用: set /p name=

所有此開關的功能只支援 RAR 格式。至於 ZIP 格式只支援壓縮操作，其他的壓縮格式都不支援此開關。

範例

  1. 將建立的分割檔檔名寫到 vollist.txt

WinRAR a -v100m -loga=vollist.txt volume.rar c:\data

  2. 將產生的壓縮檔名以 Unicode 寫到 backup.txt

WinRAR a -ag -logau=backup.txt backup.rar myfiles\*

  3. 將測試的分割檔檔名寫到 vollist.txt，並將分割檔內測試的檔名寫到 filelist.txt

WinRAR t -log=vollist.txt -logf=filelist.txt volume.part01.rar


開關：-M<n> - 設定壓縮方法

選擇 <n> 從 0 到 5，您可以選擇一個適當的壓縮模式

-m0 | 僅儲存 | 加入檔案到壓縮檔但是不壓縮
-m1 | 最快 | 最快速的方法 (最低的壓縮比)
-m2 | 快速 | 快速壓縮法
-m3 | 標準 | 標準 (預設) 壓縮方法
-m4 | 較好 | 較好的壓縮方法 (較高的壓縮比)
-m5 | 最佳 | 最佳的壓縮方法 (最高壓縮比但是速度也最慢)

在 WinRAR 的預設值是使用 [-m3] 方式 (一般壓縮)。

壓縮方式也可以利用 [壓縮檔名和參數] 對話方塊列出的 [壓縮方式] 中設定。


開關：-MA[4|5] - 指定壓縮格式的版本

RAR 預設以 RAR 5.x 格式建立壓縮檔。使用 -ma4 可以建立 RAR 4.x 壓縮檔。使用 -ma5 或只用 -ma 的時候可以儲存在設定檔的 -ma4 參數，強制 RAR 使用取代 RAR 使用 RAR 5.0 壓縮格式。

此開關只適用於建立新的壓縮檔。更新現有的壓縮檔時會忽略此開關。

範例

建立 RAR 4.0 結實壓縮檔，並使用 2 MB 壓縮 SrcDir 字典檔:

WinRAR a -ma4 -md2m data SrcDir


開關：-MC<參數> - 設定進階壓縮參數

這個開關主要是試圖進行測試和試驗，在實際環境中通常最好允許 WinRAR 去自動選擇最佳參數。請注意，不正確地使用這些開關可能導致非常嚴重的執行和壓縮損失，所以只有在您清楚理解您所要做的時使用它。

它有下列語法：

-mc[參數1][:參數2][模組][+ 或 -]

<模組>的位置是指示壓縮演算法的一個字元，它必須被設定。它可以有下列的值：

A | 聲音壓縮；
C | 全彩 (RGB) 資料壓縮；
D | delta 壓縮；
E | x86 可執行檔案壓縮；
I | Intel Itanium 可執行檔案壓縮；
T | 純文字壓縮。

RAR 5.0 壓縮檔格式只支援 'D' 及 'E' 值。

在開關結尾的 '+' 標記應用選擇的演算法模組到所處理的資料，'-'完全停用模組。如果沒有指定標記，WinRAR將基於資料和目前的壓縮模式自動選擇模組。開關 -mc- 禁止所有的選用模組並只允許一般壓縮演算法。

<參數1> 和 <參數2> 是下面敘述的參數的依靠模組。

音訊壓縮，增值壓縮：

<參數1> 使通道的位元組數 (可以是1 - 31)。

WinRAR 拆分多位元頻道成單位頻道，例如，兩個16位音訊頻道可以被 WinRAR 看作每個寬一位元組的四個頻道。

<參數2> 被忽略。

x86 可執行檔案壓縮，Intel Itanium 可執行檔案壓縮， 全彩 (RGB) 資料壓縮

<參數1> 和 <參數2> 被忽略。

純文字壓縮：

文字壓縮演算法為純文字資料提供顯著的高壓縮比。但在多核或多處理器的環境下，與一般演算法相比，因為無法有效調用數個 CPU 核心，會表現得比較花時間，這也就是為什麼文字壓縮在預設之下為停用。您可以指定 -mct 開關來允許 RAR 自動為適合的資料選用此演算法，而 -mct+ 開關則會強制所有資料都用文字壓縮。

開關-mct 也可以包含 <參數1> 及 <參數2>，因此完整語法為 -mc[參數1][:參數2]t[+ 或 -]

<參數1> 是 PPM 演算法的規則 (可以是 2 - 63)。

<參數2> 對於 PPM 可用的以百萬位元組位元單位的記憶體 (1-128)。

PPM 壓縮和解壓使用的記憶體大小相等，所以建立一個壓縮檔案時如果分配太多的記憶體，其他人在安裝了比較少記憶體的機器上解壓縮它時可能出現問題。解壓縮也可以使用虛擬記憶體，但是可能變得非常慢。

範例：

  1. 開關 -mc1a+ 強制使用對所有資料使用 8 位元單頻道單聲道音訊壓縮。
  2. 開關 -mc10：40t+ 強制使用對所有資料使用純文字壓縮最佳化演算法，設定壓縮順位到 10 並分配 40 MB記憶體。
  3. 開關 -mc12t 設定壓縮順位到 12，設定純文字壓縮順序為12，當使用純文字壓縮時，讓 WinRAR 決定何時使用它。
  4. 開關 -mct -mcd- 允許 WinRAR 對合適的資料使用純文字壓縮，且停用 delta 壓縮法。


開關：-MD<n>[k,m,g] - 選擇字典檔大小

如果結實壓縮檔內所有來源檔的大小總和或非結實壓縮檔內的最大來源檔都比字典檔大小的一半小，WinRAR 會降低字典檔大小，這樣可以降低記憶體的使用量也不會影響壓縮比。

對 RAR 4.x 壓縮檔格式，字典檔大小可以為: 64 KB, 128 KB, 256 KB, 512 KB, 1 MB, 2 MB, 4 MB

對 RAR 5.0 壓縮檔格式，字典檔大小可以為: 128 KB, 256 KB, 512 KB, 1 MB, 2 MB, 4 MB, 8 MB, 16 MB, 32 MB, 64 MB, 128 MB, 256 MB, 512 MB, 1 GB

您可以使用 'k', 'm' 及 'g' 等後置字元，以 KB, MB, GB 指定大小，例如 -md64m 指的是 64 MB 字典檔。如果沒有指定後置字元，則預設為 MB，所以 -md64m 跟 -md64 是一樣的意思。

進行壓縮時，RAR 需要大約指定字典檔大小的六倍記憶體，因此 512 MB及 1 GB 大小只能在 64 位元 RAR 提供。解壓縮時，大約配置比字典檔略大的記憶體，因此 32 位元跟 64 位元版本都能解開所有大於 1 GB字典檔的壓縮檔。

如果字典檔遠比來源資料大小還大，RAR 能降低字典檔大小，有助於不用犧牲壓縮便降低記憶體需求。

預設變動字典檔大小，RAR 4.x 中為 4 MB，RAR 5.0 中為 32 MB。

範例：

使用 RAR 5.0 格式建立結實壓縮檔，利用 128 MB 字典檔。

WinRAR a -s -ma -md128 lib *.dll


開關：-me[參數] - 設定加密參數

目前只支援 "ZL" (傳統 ZIP) 參數，因此您可以使用 -mezl 開關，伴隨 -p[密碼] 來使用傳統 ZIP 加密法對 ZIP 壓縮檔加密。沒有 -mezl 的話，ZIP 壓縮檔係使用 AES-256 壓縮，比較安全，但可能跟舊的 unzip 軟體不相容。

範例e

對 ZIP 利用舊式加密

WinRAR a -s -pmypassword -mezl docs.zip *.txt


開關：-MS[清單] - 指定儲存類型

指定不壓縮而直接僅儲存的檔案類型。當正確使用時，它將有助於增加壓縮速度，而不會顯著的減小壓縮比。

選用開關 <清單> 開關定義使用分號隔開得檔案副檔名清單。例如，-msrar;zip;jpg 將強制 RAR 不壓縮直接僅儲存所有的 RAR 和 ZIP 壓縮檔案和 JPG 圖像。它也允許在清單中指定萬用字元，所以 -ms*.rar;*.zip;*.jpg 也可以。可以使用多個 -ms 開關，例如 -msrar -mszip 可以用 -msrar;zip 來取代。

如果 <清單> 沒有被指定， -ms 開關將使用預設的包含下列檔案類型的副檔名設定：

7z, ace, arj, bz2, cab, gz, jpeg, jpg, lha, lz, lzh, mp3, rar, taz, tgz, xz, z, zip, zipx


開關：-MT<執行緒> - 設定執行緒數量

<執行緒> 參數可以從 1 到 32，為壓縮演算法也為其他 RAR 模組定義佔用的執行緒最大用量，以利啟動數個執行緒。當 RAR 企圖遵循此建議，有時實際占用的執行緒會超過指定值。

<執行緒> 參數的改變會稍微影響壓縮率。所以用不同 -mt 開關設定建立的壓縮檔，即使其他壓縮設定都一樣，結果也不盡然相同。

如果沒有指定 -mt 開關，WinRAR 會試著偵測可以用的處理器數量，自動選擇最佳化的執行緒數量。


開關：-N<檔案> - 進階篩選的檔案

應用遮罩作為進階的篩選器，以包含檔案清單。萬用字元可以同時應用於名稱及內含檔案的檔案遮罩。遮罩語法詳情請參閱開關 -x 敘述。您可以重複多次使用 '-n' 開關。這個開關不能取代一般的檔案遮罩。檔案仍然要寫在指令行中。這只是另一個控制檔案處理的開關，只處理符合 -n 開關規定的檔案。有時候可以節省指令的長度。

例如，如果您要壓縮在資料夾 Project 及 Info 中，所有 *.txt 及 *.lst 檔案，您可以輸入：

WinRAR a -r text Project\*.txt Project\*.lst Info\*.txt Info\*.lst

或使用 -n 開關：

WinRAR a -r -n*.txt -n*.lst text Project Info


開關：-N@<清單檔> - 從清單檔案讀取進階篩選遮罩

跟 -n<檔案> 開關很像，但是從列出檔案讀取篩選遮罩。

此開關並不會取代一般檔案清單或檔案遮罩這類需要在指令行輸入的指令。這是一種進階的篩選器，限制只會作用在 -n 開關指定的遮罩符合的檔案。

範例：

WinRAR a -r -n@inclist.txt text Project Info @listfile.txt


開關：-OC - 設定 NTFS 「壓縮」屬性

此開關可以在解壓縮檔案時還原 NTFS 的壓縮屬性。RAR 在壓縮檔案時會儲存「壓縮」檔案屬性，但除非使用 -oc 開關，否則在解壓縮時不會主動還原此屬性。在視窗相對的選項是解壓縮對話方塊中，[進階] 部分的 [設定壓縮屬性]。

此開關僅支援 RAR 壓縮檔案。


開關：-OH - 儲存永久連結作為取代檔案的連結

如果壓縮檔案包含許多永久連結，則儲存第一個壓縮的永久連結作為一般檔案，其他同組的永久連結連到第一個檔案。當解壓縮這類的檔案，WinRAR 會建立永久連結而不產生一般檔案。

您千萬不可以在建立壓縮檔之後，刪除或更名壓縮檔中第一個永久連結，不然會令相關的連結失效。如果您修改了第一個連結，則解壓縮之後所有連結都會解出一樣的、修改過的內容。解壓縮指定一定要包含第一個永久連結，才能成功建立之下的永久連結。

此開關只支援 RAR 5.0 格式。

此開關用於指令行，相當於 [壓縮檔名及參數] 對話方塊中的 [儲存永久連結作為連結] 選項。


開關：-OI - 儲存符合的檔案作為參照

開關：-OI[-][:<最小大小>] - 儲存符合的檔案作為參照

如果指定此開關，WinRAR 在壓縮之前先分析檔案內容。如果找到許多相同的檔案，則同組的第一個檔案會以一般檔案的方式儲存，剩下的檔案都以參照的方式儲存，連結到第一個檔案。這有助於降低壓縮檔大小，但產生許多限制。您千萬不可以在建立壓縮檔之後，刪除或更名壓縮檔中第一個永久連結，不然會令相關的連結失效。如果您修改了第一個連結，則解壓縮之後所有連結都會解出一樣的、修改過的內容。解壓縮指定一定要包含第一個永久連結，才能成功建立之下的永久連結。

如果您壓縮許多相同的檔案，且之後不會變動壓縮檔，且之後會完整地解壓縮，不會只解壓縮或忽略其中某些檔案，則建議您只用 -oi 就好。如果所有相同檔案都小到可以擠進 -md<n> 開關指定的字典檔，則開關 -s 能比 -oi 提供更有彈性的功能。

選用的 <最小大小> 值讓您定義最小檔案大小。檔案比 <最小大小> 小的不會加入分析，也不會當作相同檔案。如果沒有出現此參數，則預設為 64 KB 大小。選擇太小的 <最小大小> 可能會增加偵測相同檔案的時間。

只支援 RAR 5.0 格式。

如果您想要停用 WinRAR 設定中規定的尋找相同檔案功能，請用 -oi-

此開關適用於指令行，相等於 [壓縮檔名及參數] 對話方塊中的儲存符合的檔案作為參照選項

範例:

儲存當前資料夾的內容至 archive.rar，儲存大於或等於 1000000 位元組的相同檔案為參照

WinRAR a -oi:1000000 -ma archive


開關：-OL - 以 [絕對路徑] 連結處理符號連結

開關：-OL - 儲存符號連結當成檔案的替代連結

儲存符號連結當成連結，所以檔案或資料夾內容不被壓縮，這也將再解析點儲存為連結。這類的壓縮檔在解壓縮時會解析成符號連結或再解析點。只支援 RAR 5.0 格式。

解壓縮時，您可能需要使用系統管理員身分才能用 WinRAR 建立符號連結。

當壓縮時使用 -ol 開關，RAR 不管目標為何，加入所有連結。解壓縮時，預設的情況下 RAR 略過指向目標目錄之外的符號連結，使用絕對路徑或連結目標只以 ".." 表示，或其他潛在危險的連結參數。您可以使用 -ola 開關啟用解壓縮這類的連結。

連結指向解壓縮目標以外的目錄會出現安全性風險。請務必在確定壓縮檔內容為安全時才啟用這些解壓縮，例如您自己的備份。

連結指向解壓縮目標目錄之內的路徑，無論 -ol 或 -ola 開關的設定為何都會正常運作。

開關 -ol 適用於指令行，相等於 [壓縮檔名及參數] 對話方塊中的儲存符號連結當成連結選項。開關 -ola 相等於 [解壓縮對話方塊] 中 [符號連結內允許絕對路徑] 選項。


開關：-ONI - 允許潛在不相容名稱

因為 NTFS 檔案系統允許檔名後面存在空格及小數點記號，一堆 Windows程式無法正確處理這類檔案。如果沒有指定此開關，WinRAR 會解壓縮時自動移除檔名後面找到的的空格及小數點記號。指定此開關則會忠實地記錄原始檔名。

開關 -oni 等同於解壓縮對話方塊的 [允許潛在不相容名稱] 選項。


開關：-OR - 自動重新命名檔案

如果相同檔名已經存在，自動重新命名解壓縮的檔案。重新命名的檔案長得像 'filename(N).txt'，其中 'filename.txt' 是原始檔案名稱，而 'N' 是從 1 算起的數字，如果檔案重複則遞增。


開關：-OS - 儲存 NTFS 資料流

此開關意味著只能在 NTFS 檔案系統下使用，並允許儲存與檔案相關的交替資料串流。在壓縮時如果您在替代資料流使用軟體儲存資料，且希望保留這些資料串流時，您應該需要指定它。

NTFS 加密檔案不會儲存資料串流。

此開關相當於介面模式 [壓縮檔名和參數] 對話方塊的 [僅儲存檔案串流] 選項。

此開關僅支援 RAR 壓縮檔案。


開關：-OW - 處理檔案安全性資訊

當壓縮儲存檔案安全資訊以及解壓縮還原時，使用此開關開關。

WinRAR 僅儲存擁有人，組，檔案使用授權權和檢查資訊，但這必須在您先有讀取它們的使用授權權前提下。注意，這只支援 Windows 下的 NTFS 檔案安全系統。

此開關相當於介面模式 [壓縮檔名和參數] 對話方塊的 [僅儲存檔案安全性] 選項。

此開關只支援 RAR 壓縮檔。


開關：-O[+|-] - 設定覆寫模式

用於解壓縮及更新壓縮檔時。以下為可用模式:

-o | 覆寫前先詢問 (解壓縮檔案時之預設值)
-o+ | 覆寫全部檔案 (更新壓縮檔時的預設值);
-o- | 不覆寫現存的檔案。


開關：-P[密碼] - 設定密碼

在壓縮或解壓縮加密的壓縮檔案期間，設定密碼 <密碼> 給加密的檔案。密碼的大小寫必須匹配。在指令行時，如果您省略了密碼，您將會被提示輸入它。

在介面模式，密碼也可以經由 [輸入預設密碼] 對話方塊或在 [壓縮檔名和參數] 對話方塊輸入。

範例：

使用密碼 ZaBaToAd 來將資料夾 [games] 的內容加入檔案到壓縮檔 [secret]。

WinRAR a -pZaBaToAd -r secret games\*.*

注意

  1. 如果您希望確保壓縮檔案的安全性，密碼不要使用少於 8 個字元，或是容易被猜測出來的；
  2. 不要忘記您的密碼，否則您的資料將會完全遺失。


開關：-QO[-|+] - 加入快速開啟資訊 [無|強制]

RAR 壓縮檔在檔案敘述資料之前緊接著儲存每個檔案的檔頭，包含檔名、時間、大小及屬性。這麼做比將所有檔頭集中在單一連續的區間還能分散風險，因為集中的話只要壞一部份就毀掉整個壓縮檔。不過，即便是更值得信賴，這種檔頭散佈於等個壓縮檔各處，存取起來就相對變慢。尤其是那種需要快速開啟檔案的時機，如 WinRAR 圖形介面影響尤甚。

為了改進壓縮檔開啟速度，同時防止整個壓縮檔的重要資料位於單一毀損區塊，RAR 5.0 壓縮檔可以包含一種選用的快速開啟記錄。這種記錄會將檔名及其他檔案資訊儲存在檔案最後的連續區間，等同於壓縮檔內部各處的檔頭資料。既然區間是連續的，其內容就能很快速存取，不用花時間讀取磁碟各處。這個區間裡，每個檔頭都被雜湊驗算保護。如果RAR 偵測到快速開啟資訊損毀，就會回去改讀壓縮檔內部每個單獨的檔頭，因此就能減少損失的風險。

快速開啟資訊包含完整版本的檔頭資料，可能每個檔案會有幾十或幾百個位元組，相對增加壓縮檔大小。這增加的大小在小檔林立的壓縮檔格外明顯，檔案資料大小能與檔頭相當。因此預設的狀況之下，如果沒有指定 -qo，或指定 -qo 但沒有參數，RAR 只會對相對大檔儲存檔頭，而對小檔則繼續使用自己的檔頭資料。具體的檔案大小依據 RAR 版本而異。這樣做為速度及壓縮檔大小取得合理的平衡。如果您希望獲得最快速開啟壓縮檔的速度，不在乎大小，您可以使用 -qo+ 來儲存所有檔案的檔頭。如果您想要儘量最小的壓縮檔，不在乎壓縮檔開啟速度，可以使用 -qo- 來完全排除快速開啟資訊。

如果您想測量這個開關的效能影響，請確認壓縮檔內容不是儲存在磁碟快取中。快取的壓縮檔並沒有真正讀寫磁碟，如此一來即便沒有快速開啟記錄也能很快速開啟檔頭。

此開關適用於指令行，相等於 [壓縮檔名及參數] 對話方塊中的快速開啟資訊選項。


開關：-R - 遞迴子資料夾

啟用遞迴子資料夾，可使用於指令：a、u、f、m、x、e、t、k、rr、c 和 s。

當使用於指令 a、u、f 或 m 時，不但只有目前工作的資料夾，且在全部子資料夾的檔案將會一併處理。

當使用於指令 x、e、t、k、rr、c 或 s 時，不但只有目前工作的資料夾，且在全部子資料夾的壓縮檔案將會一併處理。

範例：

1) 加入磁片 C 的內容到壓縮檔案 Backup

WinRAR a -r Backup c:\*.*

2) 在目前的磁片測試全部的 *.rar 壓縮檔案

WinRAR t -r \*.rar


開關：-R- - 停用遞迴

停用子資料夾遞迴。

即使不用 -r 開關 WinRAR 也能在某些情形下自動啟用遞迴。開關 -r- 則防止使用它。

如果您在壓縮時指定目錄名稱，且此名稱不包含萬用字元，則預設的情形下即使沒有指定 -r，RAR 會加入目錄內容。同樣的如果磁碟根目錄沒有利用萬用字元指定檔案遮罩，RAR 會自動啟用遞迴，而開關 -r- 會停用這樣的行為。

範例:

WinRAR a -r- arc dirname

此指令只會加入空白的 'dirname' 目錄，忽略其中內容。以下指令:

WinRAR a -r- arc c:\

會壓縮根目錄 c: 的內容，不會遞迴到子目錄中。


開關：-R0 - 僅使用萬用字元名稱遞迴子資料夾

類似於開關 -r，但是與指令 a、u、f、m 合用時，只會連同包含萬用字元 [*] 和 [?] 的子資料夾名稱遮罩。

此開關只適用於檔名。目錄名稱不含檔名部分，如 'dirname'，並不受 -r0 影響，其內容也會完全加入壓縮檔，除非另外指定 -r- 開關。

範例

將目前目錄中及其子目錄的的 *.doc 檔案，加上只在本目錄中的 readme.txt 加到 docs.rar 壓縮檔。在一般的 -r 開關，RAR 也會搜尋子目錄中的 readme.txt。

WinRAR a -r0 docs.rar *.doc readme.txt


開關：-RI<p>[:<s>] - 設定優先權及停頓時間

這個開關讓 RAR 在多工環境下時，使用來管理系統載入負荷。可用任務優先權數值 <p> 是從 0 到 15。

當 <p> 等於 0 時，則使用預設的任務優先權。1 表示最低的任務優先權，15 - 最高。

停頓時間 <s> 是數值從 0 到 1000 (千分之一秒)。這是 RAR 在壓縮或解壓縮後將會歸還到系統的時段。如果您要降低更多系統負荷，可以跟 <p> 參數一起使用非零 <s>。

範例：

執行 RAR 以預設優先權並停頓 10 ms:

WinRAR a -ri0:10 backup *.*


開關：-RR[N] - 加入資料修復記錄

此開關使用於當建立或修改 RAR 壓縮檔案的時候，加入資料修復記錄至壓縮檔。RAR 4.x 格式，'N' 參數可以是修復區間的數量 (n=1?524288) 或者如果 'N' 的後面加上 '%' 或 'p' 後置字元，代表壓縮檔大小的百分比。RAR 5.0 不管有沒有後置字元，壓縮檔 'N' 永遠代表壓縮檔大小的百分比。

此開關的問法跟 "RR[N]" 指令很像。詳情請參閱 RR[N] 指令 敘述，及修復記錄。

介面模式中和這個開關等效的是壓縮檔名和參數對話方塊中的 [放置修復記錄] 選項。

範例：

WinRAR a -rr3p Books *.txt


開關：-RV[N] - 建立重新建立分割檔案

這個開關在建立 RAR 分割檔使用來建立修復分割。語法和 rv 指令相同。


開關：-S - 建立結實壓縮

結實壓縮是一種特殊的壓縮方式。結實壓縮檔案意味著以犧牲壓縮檔案更新速度來換取壓縮效率。此開關只有在建立新RAR 壓縮檔時才有意義。

此開關相當於介面模式的 [壓縮檔名和參數] 對話方塊的 [建立結實壓縮檔] 開關。

範例：

從目前資料夾加入全部的 *.c 和 *.h 檔案到結實壓縮檔案 Sources

WinRAR a -s Sources *.c *.h

請參閱結實壓縮檔章節來獲得說明資訊。


開關：-S<N> - 使用檔案計數建立結實群組

類似於 -s ，但在壓縮 <N> 個檔案之後重置結實統計資料。通常這樣會減低壓縮比，但也可以在結實壓縮檔案損壞時減少資料的遺失。


開關：-sc<字元集>[物件] - 指定字元集

為清單檔案、記錄檔及壓縮檔註解檔案指定字元集。

「字元集」參數為必要的，可以使用以下的值:

U | Unicode UTF-16
F | Unicode big5
A | 原生單位原編碼，也就是 Windows 的 ANSI
O | OEM (DOS) 編碼

來源 UTF-16 檔案的字元序，如清單檔案或註解，係由字元順序遮罩偵測。如果遺失字元順序遮罩，則假設為小端編碼。

「物件」參數為選用，可以使用以下的值:

G | 由 -ilog 開關指定的記錄檔
L | 清單檔案
C | 註解檔案

允許指定一個以上的物件，例如 -scolc。如果沒有「物件」參數，則「字元集」會應用於所有的物件。

此開關可以使用 -z<檔案> 來指定檔案的字元集、"cw" O來指定清單檔案及註解檔案。

範例

  1. 使用 OEM 編碼，從 "list" 裡面讀取名稱:

WinRAR a -scol data @list

  2. 以 Unicode 讀取 comment.txt 檔案:

WinRAR c -scuc -zcomment.txt data

  3. 以 Unicode 寫入 comment.txt 檔案:

WinRAR cw -scuc data comment.txt


開關：-SE - 根據副檔名建立結實壓縮群組

類似於 -s，但副檔名更改時重置結實統計資料。通常這樣會減低壓縮比，但也可以在結實壓縮檔案損壞時減少資料的遺失。


開關：-SL<大小> - 處理比指定還小的檔案

只處理比在此開關 <大小> 參數指定值還小的檔案。<大小> 必須用位元 (byte) 指定。

只支援 RAR 及 ZIP 格式。


開關：-SM<大小> - 處理比指定還大的檔案

只處理比在此開關 <大小> 參數指定值還大的檔案。<大小> 必須用位元 (byte) 指定。

只支援 RAR 及 ZIP 格式。


開關：-SV- - 建立從屬結實壓縮分割檔案

禁止分割檔案之間重設結實狀態。這將稍微提高壓縮比，但是意味著如果結實分割檔案遺失或損壞時減少解壓縮部分資料的機會。

如果使用非分割壓縮檔時它將被忽略。

您也可以在 WinRAR 系統介面中設定這個選精靈 RAR 環境變數中。

另請查閱： 開關 -sv


開關：-SV - 建立獨立結實壓縮分割檔案

當開始新的分割檔案 時，RAR 預設盡可能的嘗試使用結實格式狀態，但是只有前一個重置之後有足夠的可用資料封包 (至少幾百萬位元組)。這個開關會強制 RAR 忽略封包的資料大小，並試圖對任何大小的分割檔案重置狀態。這會降低壓縮比，但在結實分割檔案群組中的分割檔案遺失或損壞時可以增加解壓縮部分資料的機會。

注意有時候 RAR 即使使用這個開關也無法重置狀態。例如，當壓縮一個大檔案成許多結實分割檔案時就不能作業。RAR 只能在分離檔案之間重置狀態，而不能用在單獨檔案上。

如果用來建立不帶分割檔案的壓縮檔案時忽略。

您也可以在 WinRAR 系統介面中設定這個選精靈 RAR 環境變數 中。


開關：-S- - 停用結實壓縮

即使在 [壓縮設定檔] 對話方塊預設啟用，也不使用結實格式壓縮檔案。


開關：-SFX[名稱] - 建立自我解壓縮檔

當建立新壓縮檔案時使用此開關，將會建立一個自我解壓縮檔 (SFX)。 RAR 壓縮檔案預設使用的自解檔模組是 Default.SFX 以及 ZIP 壓縮檔案為 Zip.SFX。這些模組必須與 winrar.exe 在同一個資料夾中。您也可以指定 [-sfx] 開關來代替自解檔模組。

介面模式下，相當於此開關的是在 [壓縮檔名和參數] 對話方塊的 [建立自我解壓縮檔] 選項。

範例：

  1. 建立自解檔的結實分割壓縮檔

WinRAR a -sfx -v360 -s Games

  2. 建立壓縮檔案使用 WinCon.SFX 模組

WinRAR a -sfxWinCon.SFX Gift.rar

另請參閱 s[名稱] 指令。


開關：-T - 壓縮後測試檔案

壓縮後測試檔案。這個開關在和移動指令組合使用時非常有用，所以只有壓縮檔案已經被成功測試後，檔案才會被刪除。


開關：-TA[m,c,a,o]<日期> - 處理指定日期之後修改的檔案

只處理指定日期之後修改的檔案。包含與指定日期完全相同的檔案。

日期字串的格式是 YYYYMMDDHHMMSS。它允許在日期字串中插入 '-' 或 ':' 的分隔符號，並忽略後部區域。例如，下列開關是正確的：-ta2001-11-20。在內部它被轉換成 -ta20011120000000 並當作「從2001年11月20日0時0分0秒後修改的區域」。

使用 'm', 'c', 'a' 修改字元來指定修改、建立及上次存取時間，例如 -tac20011120 用於建立時間。如果省略這樣的修改字元，會指定為修改時間。

在相同開關中可以使用多個控制參數，就像 -tamc20190215，用來設定相同日期給所有指定的時間。也可以使用多個時間篩選開關給指令。時間篩選使用 AND 邏輯，因此檔案必須得符合所有篩選條件才能進行處理。使用 'o' 控制參數可以改用 OR 邏輯，例如，使用 -taco20190201 -tamo20190210 來採用檔案建立時間在 2019-02-01 之後或者變更時間在 2019-02-10 之後。


開關：-TB[m,c,a,o]<日期> - 處理指定日期之前修改的檔案

只處理指定日期之前修改的檔案。不含與指定日期完全相同的檔案。

日期字串的格式是 YYYYMMDDHHMMSS。它允許在日期字串中插入 '-' 或 ':' 的分隔符號，並忽略後部區域。例如，下列開關是正確的：-ta2001-11-20在內部它被轉換成 -ta20011120000000 並當作「從2001年11月20日0時0分0秒後修改的區域」。

使用 'm', 'c', 'a' 修改字元來指定修改、建立及上次存取時間，例如 -tbc20011120 用於建立時間。如果省略這樣的修改字元，會指定為修改時間。

在相同開關中可以使用多個控制參數，就像 -tbmc20190215，用來設定相同日期給所有指定的時間。也可以使用多個時間篩選開關給指令。時間篩選使用 AND 邏輯，因此檔案必須得符合所有篩選條件才能進行處理。使用 'o' 控制參數可以改用 OR 邏輯，例如，使用 -tbco20190201 -tbmo20190210 來採用檔案建立時間在 2019-02-01 之前或者修改時間在 2019-02-10 之前。


開關：-TK - 保留原始壓縮檔時間

當壓縮檔案發生改變時，防止 WinRAR 修改壓縮檔案時間。


開關：-TL - 以最新的檔案時間設定壓縮檔時間

設定壓縮檔案的時間為壓縮檔案中最新檔案時間。強制 WinRAR 以在壓縮檔案中最新檔案時間修改壓縮檔案時間。


開關：-TN[m,c,a,o]<時間> - 處理比指定時間還新的檔案

使用此開關時，只處理比指定時間還新的那些檔案，包含與指定日期完全相同的檔案。

時間字串的格式為：

[<n日>d][<n時>h][<n分>m][<n秒>s]

例如，使用開關 -tn15d 可處理最近 15 天的檔案，以及 -tn2h30m 則處理最近 2 時 30 分的檔案。

使用 'm', 'c', 'a' 修改字元來指定修改、建立及上次存取時間，例如 -tnc20011120 用於建立時間。如果省略這樣的修改字元，會指定為修改時間。

在相同開關中可以使用多個控制參數，就像 -tamc30d，用來設定相同日期給所有指定的時間。也可以使用多個時間篩選開關給指令。時間篩選使用 AND 邏輯，因此檔案必須得符合所有篩選條件才能進行處理。使用 'o' 控制參數可以改用 OR 邏輯，例如，使用 -tnco30d -tnmo20d 來採用檔案建立時間在 30 天內或者變更時間在 20 天內。


開關：-TO[m,c,a,o]<時間> - 處理比指定時間還舊的檔案

使用此開關時，只處理比指定時間還舊的那些檔案，不含與指定日期完全相同的檔案。

時間字串的格式為：

[<n日>d][<n時>h][<n分>m][<n秒>s]

例如，使用開關 -to15d 可處理檔案較早於 15 天的，以及 -to2h30m 則處理檔案較早於 2 時 30 分的。

使用 'm', 'c', 'a' 修改字元來指定修改、建立及上次存取時間，例如 -toc20011120 用於建立時間。如果省略這樣的修改字元，會指定為修改時間。

在相同開關中可以使用多個控制參數，就像 -tomc30d，用來設定相同日期給所有指定的時間。也可以使用多個時間篩選開關給指令。時間篩選使用 AND 邏輯，因此檔案必須得符合所有篩選條件才能進行處理。使用 'o' 控制參數可以改用 OR 邏輯，例如，使用 -toco30d -tomo20d 來採用檔案建立時間在 30 天內或者變更時間在 20 天內。


開關：-TS[m,c,a,p][+,-,1] - 儲存或修復檔案時間 (修改,建立,存取,保留)

使用 -tsm 儲存檔案修改時間，-tsc 用於建立時間，-tsa 則為修改時間。可以併用多個 -ts 開關，如 -tsc -tsa。如果沒有指定 'm','c', 'a'，則認定三個都要。

添加 '+' 則記錄作業系統跟檔案系統能使用的最長的精度，Windows 最長 100 奈秒，Unix 則為 1 奈秒。添加 '1' 設定 1 秒精度，'-' 不記錄檔案時間。如果沒有指定 '+','-','1'，則認定為 '+'，因此 -ts+ 及 -ts 都儲存三種高精度時間。

相同檔案儲存的所有時間都擁有相同的精度。如果指定不同精度，如 -tsm1 -tsc+，則選用最普通的那個。

RAR 4.x 壓縮檔永遠含有修改時間，且 RAR 4.x 壓縮檔 -hsm- 依然儲存最低兩秒精度的修改時間，另外兩種時間可以不記錄。RAR 5.0 壓縮檔可以允許忽視任何檔案時間，包含修改時間，所以解壓縮的檔案會有當下的系統時間。開關 -tsm- -tsc- -tsa- 或只用 -ts- 會儲存低精度修改時間給 RAR 4.x 格式，而對 RAR 5.0 壓縮檔則不記錄時間。

如果沒有指定 -ts 開關，RAR 儲存高精度修改時間，忽略其他兩種時間。

WinRAR 預設只設定修改時間，不管壓縮檔是否包含另外兩種時間。解壓縮時必須用 -ts 或 -ts+ 設定所有三種時間，-tsc 及 -tsa 設定建立及存取時間，-tsm- 或 -ts- 設為當下系統時間，取代壓縮檔儲存的修改時間。

壓縮時使用 -tsp 開關則會保留來源檔案中最後存取的那個檔案的原始存取時間。這個開關保留壓縮檔原始的上次存取時間，但無法控制哪個時間戳記要存在壓縮檔中。必須要結合其他 -ts 開關才行。例如，如果要儲存上次存取時間到壓縮檔，且保留原始檔案的上次存取時間，就必須同時使用 -tsa -tsp。

您也可以在相同開關中混用許多輔助字元，例如 -tscap 來簡化 -tsc -tsa -tsp。

所有上述敘述僅支援 RAR 格式。至於 ZIP 壓縮檔其高精度修改時間則儲存在與建立及上次修改時間相同結構的地方。壓縮成 ZIP 時，當 -tsa 及 -tsc 都忽略時，所有三種時間都以 -ts 或 -tsm 選項控制。使用 -ts 或 -tsm 來以高精度儲存所有時間 (此為 ZIP 預設模式)，而指定 -ts- 或 -tsm- 則指儲存低精度修改時間。解壓縮 ZIP 時，-tsm -tsc -tsa 開關可以分開使用。控制相對的時間，就如同對 RAR 格式一樣。

範例：

  1. 以最高精準度儲存所有檔案時間：

WinRAR a -ts backup

  2. 儲存修改和最近存取時間。開關 -tsm 不是必要的，因為本來就是 RAR 預設值。如果我們只想回復存取時間，就應該使用 -tsm- -tsa 開關。

WinRAR x -tsa backup

  3. 儲存低精準度的修改和建立時間。保留來源檔上次存取時間。

WinRAR a -tsm1 -tsc1 -tsp backup


開關：-U - 更新檔案

這可與壓縮檔案解壓和建立時合用。指令字串 a -u 相當於指令 u 。您也可以使用開關 [-u] 於指令 m。

如果開關 [-u] 使用於指令 x 或 e ，這時從壓縮檔案解壓縮，有最近使用的檔案，只有在舊檔案有新版本時才會替換。這不和 -f 一樣，如果壓縮檔案沒有符合的未壓縮檔案，它將會被解壓縮。

介面模式下，相當於此開關的是在 [壓縮檔名和參數] 對話方塊的 [加入並更新檔案] 開關和在 [解壓縮路徑和選項] 對話方塊的 [解壓縮並更新檔案] 選項。

只支援 RAR 及 ZIP 格式。


開關：-V<n>[k|b|f|m|M|g|G] - 建立分割檔案

建立分割檔案，其大小 = <n>*1000

預設此開關使用 <n> 作為一千個 (1000) 位元組 (非 1024 x 位元組)。您也可以輸入符號 "k" 來表示千位元組的大小，或者符號 "b" 表示位元組，在百萬位元組為 "m"，一百萬個位元組為 "M"，十億位元組為 "g"，十億個位元組為 "G"，或者使用符號 "f" 從數個預先定義的數值中選取一個。 預先定義的數值有 360、720、1200、1440 或 2880 並會替換成一致的磁片大小。如果省略了大小，將會使用自動偵測。

您可以使用小數點代表輸入的是十進位。例如，-v1.5g 表示 1.5 gigabytes

您可以指定許多 -v 開關來為不同的分割檔案設定不同大小。例如：

rar a -v100k -v200k -v300k arcname

則設定 100 KB 大小給第一個分割檔案，200 KB 給第二個分割檔案，300 KB 給剩下來的分割檔案。

如果分割檔案在卸除式磁片建立，在建立第一個分割檔案之後，使用者將會被提示：

建立下一個分割檔案嗎 ? ：是/否/建立全部

在此時間裡，您可以抽換磁片。回答 [全部] 則會建立全部的分割檔案而不會暫停。

預設 RAR 分割檔案以 'volname.partNNN.rar' 格式命名，NNN 的地方是分割檔案編號。 RAR 4.x 壓縮格式使用 -vn 開關 RAR 4.x 格式使用 -vn 開關可以換到另一種，根據副檔名的方案，這種情況下分割序列的第一個分割副檔名是 .rar，後繼的分割檔案 .r00到 .r99 編號。RAR 5.0 壓縮檔不支援 -vn 及延伸基礎名稱。

當解壓縮或測試多片的分割壓縮檔時，您只能使用第一個分割檔案的名稱。如果下一個分割檔案不在磁碟機時，使用者會被提示：

請插入磁片 <下一個分割檔案名稱>。 確定/取消

這時請插入正確的分割檔案並按 [確定]。

壓縮檔案分割檔案是無法修改的。指令 d,f,u 及 s 也不能使用於多片的分割壓縮檔。指令 a 只可以在建立新的多片分割檔案壓縮時使用。

這是可能的，雖然不和在分割檔案中檔案的大小一樣，但可以大於未壓縮的大小。此事實的緣由是 [僅儲存] (如果大小增加時不壓縮) 不能在多片的分割檔案壓縮中啟用。

壓縮檔案分割檔案可以是結實以及/或是自解檔。

此開關相當於介面模式 [壓縮檔名和參數] 對話方塊的 [分割檔案大小] 區域。

範例：

建立 1200000 位元組大小的結實，分割檔案自我解壓縮檔

WinRAR a -v1200 -s -sfx bitmaps


開關：-VD - 建立分割檔案前先刪除磁碟內容

當使用 "-vd" 時，在開始壓縮操作之前，全部在目標磁片的檔案和資料夾將會先清除。如果您建立分割檔案，在建立每一個分割檔案之前，都將先執行清除操作，以讓您可以放入非空白的磁片，但您必須注意在磁片上不包含任何的有用資訊。

此開關只能應用在抽取式磁片，硬碟是無法使用它清除的。


開關：-VER[n] - 檔案版本控制項

當在已經存在的壓縮檔案中更新檔案時，強制 RAR 保留前面檔案版本。舊版本被命名為 'filename;n'，'n' 是版本編號碼。僅支援 RAR 壓縮檔。

當時不使用開關 -ver 解壓縮一個壓縮檔案，rar 預設只解壓縮最近加入地檔案版本，它的名字不能包含數字尾碼。但是如果您正確指定了檔案名稱，包括版本，它也可以解壓縮。例如，'rar x arcname' 將只解壓縮群組新版本，當使用 'rar x arcname file.txt;5' 將解壓縮 'file.txt;5'，如果它在壓縮檔案中存在的話。

解壓縮時如果您不帶參數指定 -ver 開關， RAR 將解壓縮所有和檔案遮罩匹配的所有檔案中的所有版本。這樣版本編號碼不會從未壓縮檔名稱中刪除。您也可以使用號碼作為 -ver 的參數來解壓縮一個存在的檔案版本。它將告訴 RAR 只解壓縮這個版本並從檔案名稱中刪除版本編號。例如，'rar x -ver5 arcname' 將只解壓縮第五版本檔案。

如果您在壓縮時指定 'n' 參數，會限制儲存在壓縮檔中，檔案版本能儲存的最大值。舊的檔案版本超過這個限制會被移除掉。

使用 -ver 開關來保存時，建議避免使用 'filename;n' 之類的名稱格式來添加，如果舊版在壓縮檔既有或即將建立的使用同名稱，會引起產生重複項目。


開關：-VN - 使用舊式分割檔案命名法

預設 RAR 分割檔案 以 'volname.partNNN.rar' 格式命名，NNN 的地方是分割檔案編號。RAR 4.x 格式使用 -vn 開關可以切換到另一種，以副檔名為主的命名方案，這種方案下，分割序列第一個分割的副檔名是 .rar，後繼的分割按 .r00 到 .r99 編號。

RAR 5.0 壓縮檔不支援 -vn 及延伸基礎名稱。


開關：-VP - 每個分割檔案進行前先暫停

預設 RAR 僅在卸除式磁片建立，或解壓縮下一個分割檔案之前才會詢問確認。此開關強制永遠作如此的確認。如果磁碟空間有限，並且您希望在建立之後立即複製每一個分割檔案到另外的磁片時，這會相當有用。

預設 WinRAR 只會在壓縮到抽取式磁碟、且剩下的磁碟空間少於分割檔時，才會在處理下個分割檔之前先提出詢問。此開關強制規定建立或解壓縮分割檔之前都要提出詢問。例如，如果您希望建立分割檔之後立刻搬到其他儲存媒體，此功能就很實用。


開關：-W<路徑> - 設定暫存檔所在的資料夾

WinRAR 需要建立暫時的檔案及資料夾，例如修改壓縮檔。預設的情況會使用 [設定] 對話方塊中，[路徑] 頁籤在 [放置暫存檔案的資料夾] 上面的定義。當在指令行使用 WinRAR 時，您可以用 -w<路徑> 開關來改用此值。

範例:

要新增敘述至 info.rar 檔，並使用 d:\tmp 資料夾作為暫存資料夾

WinRAR c -wd:\tmp -zcomment.txt info.rar


開關：-X<檔案> - 排除指定的檔案

排除指定操作的檔案或資料夾。萬用字元可以用在檔案遮罩的名稱及路徑的部分。在同一指令行您可以指定開關 '-x' 數次來定義要排除的遮罩。

如果遮罩包含萬用字元，則該規則是用於當下資料夾及其子資料夾。沒有萬用字元是不會同時應用在其他層的，所以在解壓縮、壓縮檔內根目錄解壓縮時，"filename" 遮罩只會作用於相同目錄的 'filename' 檔案。

使用 "*\filename" 語法可以遞迴排除所有資料夾底下的 "filename"。

如果您知道檔案的確實路徑，可以使用 "path\filename" 語法來排除此唯一的 "filename"。如果您解壓縮時使用 -xpath\filename 語法，則上面的 "path" 必須是在壓縮檔內的路徑，不是解壓縮之後真正的磁碟路徑。

預設的狀態下，只有檔案能使用含有萬用字元的遮罩。如果您想要使用萬用字元的遮罩來排除許多目錄，請使用目錄排除遮罩專用的特殊語法。這類的遮罩必須含有斜線分隔字元 (Windows 是 '\' 而 Unix 是 '/')。例如，"*tmp*\" 遮罩會排除所有符合 "*tmp*" 條件的目錄，而 "*\tmp\"則排除所有 'tmp' 目錄。既然出現萬用字元，以上兩者都會運用在當下的目錄及其子目錄。資料夾排除遮罩只支援 RAR 及 ZIP 格式。

如果您只想排除一層目錄，請指定明確的目錄名稱，絕對或相對路徑都可以，並且不要使用萬用字元。如此一來您也不必給遮罩加上斜線字元，因為這只針對使用萬用字元時，要分辨是檔案排除遮罩還是目錄排除遮罩之用。

範例：

  1. 壓縮所有檔案，但排除當前目錄及底下目錄的 *.jpg 及 *.avi 檔<

WinRAR a -r -x*.jpg -x*.avi rawfiles

  2. 壓縮所有磁碟 C: 的檔案，但排除 'temp' 目錄及 'temp' 目錄中的檔案

WinRAR a -r -x*\temp\ savec c:\*

  3. 從 docs.rar 解壓縮所有檔案，但排除 *.txt

WinRAR x -x*.txt docs


開關：-X@<檔案清單> - 排除指定清單內列出之檔案

排除存在清單檔案 <清單檔案> 名稱的檔案

範例：

加入全部 *.exe 檔案到壓縮檔案 bin，但是如果名稱存在 list.txt 的則排除。

WinRAR a -x@list.txt bin *.exe


開關：-Y - 所有問題的預設值為「是」

如果指定了此開關，[是] 為預設值，並自動回應全部的詢問。


開關：-Z<檔案> - 讀取檔案的壓縮檔註解

如果此開關與任何的壓縮檔案更新指令合用時，將會從指定的檔案讀取註解，加入檔案到壓縮檔中。如果您要指定註解的字元集，則請用 -sc 開關。

範例：

從目前資料夾加入全部檔案到結實壓縮檔案 Receipts，並從 Receipts.diz 加入檔案註解

WinRAR a -zReceipts.diz -s Receipts


WinRAR 結束代碼清單

WinRAR 成功操作後傳回零 (0) 代碼。結束代碼非零表示發生以下錯誤:

代碼值 | 敘述
0 | 操作完成。
1 | 警告，沒有嚴重錯誤。
2 | 有嚴重錯誤。
3 | 無效的雜湊驗證，資料毀損。
4 | 企圖更動鎖定的壓縮檔。
5 | 寫入發生錯誤。
6 | 檔案開啟錯誤。
7 | 錯誤的指令行選項。
8 | 記憶體不足。
9 | 建立檔案發生錯誤。
10 | 從指定的遮罩及選項條件中找不到符合條件的檔案。
11 | 密碼錯誤。
255 | 使用者中斷。


[一般設定] 對話方塊

要啟動此對話方塊，在 [選項] 功能表選擇 [設定... ] 指令並在 [一般設定] 選項上按一下。對話方塊的內容敘述如下。

系統/低執行優先順序

WinRAR 以此選項作為多工環境下的系統佔用規則。通常使用一般優先順序是最佳的選擇，但如果您常與其他應用程式合用，並將 WinRAR 放在背景執行時，您可能希望使用較低的優先順序。

系統/多執行緒

一但啟用，WinRAR 會使用壓縮演算法的多執行緒版本，在多處理器或多核心架構下提供更高效能。預設的狀況下，如果系統偵測到處理器環境多於一，則這個選項是開啟的。不過在單處理器系統內也可以手動開啟。

此選項不只影響壓縮，也能影響其他能啟動多執行緒的 WinRAR 模組。通常預設 WinRAR 的狀態已經最佳化，您不需要變更它。

歷程/儲存壓縮記錄

預設 WinRAR 會在 [檔案] 功能表儲存少量最近打開過的壓縮檔名，方便您再次快速的使用它們。但如果您需要停用它，例如基於保密理由時，您可以清除該選項。

同時，如果開啟此選項，WinRAR 會將開啟的壓縮檔列於 Windows 最近開啟的文件清單。如果關閉 [儲存壓縮記錄]，則讓 Windows 自行管理最近開啟的文件清單。如此一來會不會列於清單中，取決於 Windows 的版本及設定。

歷程/在對話方塊中可以顯示歷程

有些 WinRAR 對話方塊中，輸入的欄位支援顯示過去輸入過的字串，以便重複使用早先輸入過的值 (壓縮檔名稱、目標路徑等等)。這可以節省使用者的時間，但如同前面的選項一樣，在多人合用電腦的環境下可能會有隱私權的問題。所以如果您與其他人共用電腦，也許您可以考慮停用此選項。

工具列/按鈕大小

選擇工作列按鈕大小。只有 WinRAR 預設面板適用。

工具列/顯示按鈕純文字

控制顯示按鈕文字。

工具列/鎖定工具列

預防使用者改變工具列的大小。您可以使用此選項，防止您安排好工具列後又被意外的更動工具列的大小及位置。

工具列/工具列...

打開對話方塊允許選項主要 WinRAR 工具列、其他含有 [上移一層] 按鈕及含有路徑或壓縮檔資訊的位址列。

工具列/按鈕...

按一下 [按鈕...] 可打開一個對話方塊，在那裡您可以指定要顯示哪一些工具列按鈕。

啟動時顯示介面/啟動精靈

轉換 WinRAR 到精靈模式，啟動就會顯示。

介面/啟用聲音提示功能

在錯誤及長時間操作完成後，啟用 WinRAR 製造聲音來提示。

介面/顯示壓縮檔案的註解

如果打開的壓縮檔案含有註解時，顯示註解視窗。

介面/重複使用現有視窗

如果意圖打開新壓縮檔案，執行 WinRAR <壓縮檔名稱> 指令或在壓縮檔案圖示上按一下，並且 WinRAR 視窗已存在時，將壓縮檔案打開於已存在的視窗中，如果未啟用此選項，則會建立一個新視窗。

介面/最上層顯示

將 WinRAR 視窗放在所有程式的上面。如果您經常使用 WinRAR 拖曳目標時，您可以做此設定。

介面/標題列顯示完整路徑

在 WinRAR 標題列顯示當下開啟的資料夾或壓縮檔的完整路徑。

介面/Windows 進度列

這個選項控制視窗在顯示壓縮及解壓縮進度時的外觀。如果啟用，WinRAR 使用標準的視窗進度列。如果停用，則使用 WinRAR 自己的進度列。您可以在舊版本的視窗版本中關閉此選項，而在 Windows Vista 及更新版本使用此選項，得到更好的視覺效果。請注意視窗進度列只有雙色，不像 WinRAR 的進度列還能同時顯示壓縮率；不過壓縮比例文字也同時顯示在進度視窗的另一行。

介面/工作列進度列

啟用此選項，WinRAR 會顯示操作的整體進度，也會在工作列的 WinRAR 圖示上顯示。工作列進度列的功能是從 Windows 7 開始的，所以 [工作列進度列] 選項在其他舊版 Windows 是停用的。

記錄/將記錄錯誤到記錄檔

在壓縮檔案損壞的時候，將錯誤消息和資訊寫入到與 %APPDATA%\WinRAR 資料夾下的檔案 rar.log。此選項只在註冊之後才能有效。使用 [選項] 功能表的 [檢視記錄] 可以檢視記錄的內容。

記錄/限制記錄大小為 <nnn> KB

啟用限制 WinRAR 所建立的記錄 rar.log 的大小，允許最小的記錄值為 50KB。


[壓縮設定] 對話方塊

要啟動此對話方塊，在 [選項] 功能表選擇 [設定...] 指令並在 [壓縮設定] 選項上按一下。對話方塊的內容敘述如下。注意，大多數的壓縮選項都可以利用 [壓縮設定檔案/建立預設值] 按鈕指定。

要獲得不同壓縮選項之間差異的詳細資料，可在主題怎樣選擇最佳化的壓縮設定中找到。

壓縮設定檔案/建立預設值

在按一下此按鈕後，在顯示的對話方塊您可以指定大部分壓縮操作的預設值選項。線上說明在此對話方塊的全部或部分也可以使用，在任何時候只要按一下 [說明] 按鈕便可以讀取詳細的選項敘述。

在此對話方塊所輸入的選項值會被儲存在預設的壓縮設定檔，名稱為 [預設設定檔]，並在每一個壓縮檔案操作之前自動的還原。

有些預設壓縮設定檔的參數不只用在將檔案加到壓縮檔時，也可以適用於其他變更壓檔的作業，例如刪除或將檔案重新命名。此時 WinRAR 只讀取適合此作業的參數。解壓縮用不到預設壓縮設定檔的任何選項。

壓縮設定檔案/管理

打開此對話方塊可以管理壓縮設定檔。在此 [管理設定檔] 對話方塊中您可以刪除已存在的對話方塊或者是編輯它們的選項。比如說，您可以重新命名設定檔或將它設定為預設值等。請讀取此對話方塊的相關線上說明可獲得更多的資訊。

分割檔大小清單/定義分割檔大小...

此按鈕打開 [定義分割檔大小] 對話方塊。這裡您可以自定喜好的分割檔大小，與 [壓縮檔名稱及參數] 對話方塊中的 [分割檔，大小] 項目關聯。

優先視為壓縮檔開啟的檔案類型

定義在 WinRAR 檔案管理模式中對非壓縮檔檔案或壓縮檔內檔案按 Enter 鍵或點兩下該怎麼進一步處理。這並不影響一般壓縮副檔名的行為，例如 .rar 或 .zip 等。

選擇一或多個遮罩，以空白字元分隔，來定義視為壓縮檔。所有不符壓縮檔副檔名定義的檔案會直接執行，或用相關聯的程式開啟。例如，如果這裡沒有 *.exe 遮罩，而且您在 WinRAR 檔案清單對自解檔按 Enter，WinRAR 會執行此自解檔，不會顯示壓縮檔內容。

如果符合任何遮罩，WinRAR 會先以壓縮檔開啟，但如果發現其實不是壓縮檔，則會用一般檔案方式處理。此選項在壓縮檔內會加以忽略，所以在壓縮檔內對檔案按 Enter 會直接用檔案關聯處理。

無論上述選項為何，您都可以在 WinRAR 檔案清單中，檔案的上面按 Ctrl+PgDn 按鍵直接開啟。


[路徑] 設定對話方塊

要啟動此對話方塊，在 [選項] 功能表 選擇 [設定... ] 指令並在 [路徑] 標籤頁上按一下。對話方塊的內容敘述如下。

暫存資料夾

WinRAR 使用此資料夾建立暫存檔案，如果此區域留白，暫存檔案及目錄會在當前的資料夾建立，或者建立於暫存資料夾。這取決於指令類型。

此參數的起始狀態是標準 Windows 暫存資料夾。如果您曾修改過，又想恢復回 Windows 暫存資料夾，則可以輸入 %temp% 來替代資料夾名稱。WinRAR 會在建立暫存檔之前先解開至 Windows 暫存資料夾。

暫存資料夾/僅使用於抽取式磁碟

在目前資料夾建立臨時壓縮檔時，硬碟通常比較快。對於慢速外部磁碟而言，先在硬碟建立好壓縮檔之後再複製到外部磁碟會更有效率。當有此類需要時，您需指定「暫存資料夾」，並打開 [僅使用於抽取式磁碟] 選項。

[僅使用於抽取式磁碟] 選項只有在含壓縮檔變更的指令時才有效。其他的指令由於不需要，會忽略當前的磁碟類型。

啟動資料夾

您可以在此輸入每次 WinRAR 啟動時所打開的資料夾。注意，此選項僅在 [啟動] 的選項 [啟動時開啟上次使用的資料夾] 關閉時才有意義，不然的會，則設定為上次使用的資料夾。

啟動資料夾/啟動時開啟上次使用的資料夾

如果啟用此選項，當執行未加選項時，WinRAR 將會設在上次檢視的資料夾。

壓縮檔預設資料夾

如果此欄位不是空白，且壓縮檔名不含完整路徑，則壓縮檔會建立在指定的資料夾。例如，如果您輸入桌面的路徑，WinRAR 建立的壓縮檔會出現在桌面上。

如果此欄位留白，且壓縮檔不含完整路徑，壓縮檔會建立在與被壓縮檔案相同的路徑。

指令行模式 -cfg- 開關會停用大多數 WinRAR 的設定，包含壓縮檔預設資料夾。

解壓縮檔案預設的資料夾

您可以在這裡輸入資料夾名稱，這會用來建構從不經確認就解壓縮及解壓縮檔案至指定資料夾指令為本定義的結構。WinRAR 從這些解壓縮指令建立目標路徑，結合預設資料夾與壓縮檔名稱。如果您在此輸入桌面路徑，就會立刻解壓縮到桌面。

跟壓縮檔預設資料夾不同，解壓縮檔案預設資夾不在指令行模式使用。只有 [解壓縮檔案] 指令會受到內容功能表影響。

附加壓縮檔名至路徑

為解壓縮檔案設定目標路徑時，這控制壓縮檔名是否要跟隨在預設資料夾後面，或者到解壓縮對話方塊指定的資料夾。

將解壓縮的路徑移除多餘的資料夾

此選項只用於內容選單，而且只針對單一資料夾內選取的單一壓縮檔、壓縮檔跟目錄沒有檔案、使用 [解壓縮至目標路徑\] 指令、其目標路徑名稱由 WinRAR 根據壓縮名稱指定。如果上述條件都吻合，此選項會移除壓縮檔名為基準的最上層資料夾。

例如，如果您的 Pictures.rar 內，所有檔案都包在 'Samples' 資料夾內，且用 [解壓縮到 Pictures\] 內容選單解壓縮，關閉此選項時，WinRAR 會將所有檔案放到 "Pictures\Samples" 中。開啟此選項時則放在 "Samples" 中。這樣可以節省多按滑鼠一次，不用開啟 'Pictures' 空白資料夾再開 'Samples'。

此選項帶給解壓縮初期延遲，因為 WinRAR 需要先掃描壓縮檔且分析資料夾結構。請注意內容選單依然會顯示以壓縮檔名為範本的資料夾名稱，即使解壓縮後會移除這層。在內容選單顯示正確資料夾會帶給按右鍵過度的延遲，拖慢內容功能表顯示的時間。


[檔案清單] 設定對話方塊

要啟動此對話方塊，在 [選項] 功能表 選擇 [設定... ] 指令並在 [檔案清單] 選項上按一下。對話方塊的內容敘述如下。請注意， [顯示格線]、[整行選取] 和 [選擇] 選項在舊版 Windows 95 下是無作用的，而之後的 Windows 版本則都有效。

清單類型 (清單檢視或詳細內容)

選擇清單檢視 (多域，只顯示檔案圖示) 或詳細資料檢視 (單域，提供每一個檔案大小，日期和類型資訊) 其中一種。預設的模式是詳細內容檢視。

清單樣式/顯示格線

在檔案清單上顯示格線。

清單樣式/整行選取

使用整行式游標。

清單樣式/核取方塊

在選取清單項目中使用核取方塊。在 Windows Vista 及更新版本支援。

檔案名稱/先顯示壓縮檔

不管目前的排序模式為何，將壓縮檔案列於所有檔案之前優先顯示。

檔案名稱/用顏色區別加密或壓縮的 NTFS 檔案

如果使用，WinRAR 會跟檔案總管一樣，用顏色區別 NTFS 系統中「壓縮」及「加密」屬性的檔案。預設「壓縮」是藍色的，「加密」是綠色的。

檔案名稱/結合分割檔內容

如果該選項啟用，而且您打開第一個分割檔案 ，WinRAR 會試著讀取所有在資料夾內的其他有效的接續分割壓縮檔，並當作第一個分割壓縮檔的內容顯示。如此交互作用，所看到的不僅是第一個分割檔包含的檔案，您將會看到第一個以及隨後分割檔壓縮所包含的檔案。

檔案名稱/顯示秒

在檔案清單中的檔案日期顯示秒。沒有使用這選項的話 WinRAR 顯示的日期精度為分鐘。

檔案名稱/解壓縮大小

如果選用此選項，則檔案大小以位元組顯示。如果關閉，顯示大小會精簡格式為 KB 或 MB，小檔案仍以位元組為單位顯示。此選項也適用於其他 WinRAR 介面，例如狀態列中的總進度及選擇的大小。

檔案名稱/欄位

選擇在檔案及壓縮檔管理模式顯示的欄位。

檔案名稱/設定字型

為檔案清單級樹狀資料夾平台選擇字型。

選擇

在此，您可為清單設定不同的滑鼠形式。如果您希望用網際網路瀏覽器形式的話，設定 [點一下滑鼠來打開項目]。在此模式下，如果您希望檔案名稱下加下劃線時，您也可以在此選擇，而預設的 WinRAR 模式為 [點兩下滑鼠來打開項目]。


[檢視工具] 設定對話方塊

要啟動此對話方塊，在 WinRAR 的 [選項] 功能表選擇 [設定... ] O並在 [檢視工具] 選項上按一下。對話方塊的內容敘述如下。

檢視類型

選擇當使用者按 Enter 時預設的動作，可用的動作為：

內部檢視工具 | 使用內部 WinRAR 檢視工具
外部檢視工具 | 使用外部檢視工具，您可在 [外部檢視工具] 區域中定義名稱
關聯程式 | 使用該類型的 Windows 預設檢視工具
詢問 | 每次按 Enter 時詢問使用者想要用的檢視工具類型

這些設定會被一些檔案類型所忽略：在檔案管理模式忽略壓縮檔和可執行檔案。按 Enter 時，WinRAR 始終會試著開啟壓縮檔並執行 exe 檔案。如果 Enter在壓縮過的 exe 檔案，WinRAR 會解壓縮整個壓縮檔到暫存資料夾，然後執行 exe 檔案，並等候可執行檔案結束。在壓縮檔管理模式則忽略在檢視器對話方塊中 [檢視下列檔案時，全部先解壓縮] 的設定。如有需要的話更新來源壓縮檔案，並在之後刪除暫存資料夾和它的全部內容。這提供從壓縮檔案直接安裝程式的簡便方法。

和 Enter 不一樣的是檢視檔案指令永遠使用 WinRAR 內部檢視工具 打開檔案。

內部檢視工具 /自動偵測編碼

如果選取此選項，內部檢視工具會偵測內容為 ANSI (Windows), OEM (DOS), UTF-8 還是 UTF-16 編碼。如果偵測失敗，可以將開啟的檔案改編碼，即使用 [檢視] 選單上的 [檢視為] 指令。

內部檢視工具 /重複使用現用的視窗

根據此選項，內部檢視工具將使用 Windows (如果未設定選項) 或 DOS 編碼打開檔案。使用 [檢視] 功能表的 [檢視方式] 指令，可以改變內部檢視工具，讓目前打開的檔案使用純文字編碼。

內部檢視工具 /自動換行

如果該選項關閉，WinRAR 會為每一個檢視的檔案建立個別的內部檢視工具視窗。當選項是打開狀態時，則重複使用現有視窗，因此只會有一個打開的檢視工具。

檢視下列檔案時，全部先解壓縮

當使用者按 Enter 或按兩下符合遮罩定義的檔案時，需要解壓縮所有的內容。遮罩要以空白區隔。例如，如果此欄位的內容是 "*.exe *.htm *.html"，WinRAR 會在開啟壓縮的執行檔或 HTML 檔之前，先將其他的檔案也解壓縮。這個選項適用於執行的檔案通常要參考壓縮檔內的其他檔案才能正常運作之類的檔案。

WinRAR 忽略在 [檢視下列檔案時，全部先解壓縮] 欄位中「檢視類型」設定的定義，而以關聯的程式開啟。

忽略其他程式對這些檔案即時的更動

預設的狀況下，WinRAR 會在檢視器修改或建立檔案時更新壓縮檔，但可以停止這類行為。您可以在 [忽略其他程式對這些檔案即時的更動] 選項，輸入檔案遮罩，以空格分開，則在符合這些條件之下，WinRAR 在遇到外部檢視器更動檔案時也不會詢問要不要更新壓縮檔。

例如，如果此欄位包含 *.doc *.txt，則任何 .doc 及 .txt 檔案被外部檢視器或關聯編輯器修改或新增，都會被忽略。任何變更都會失效。如果您要對所有檢視過的檔案都停用壓縮檔更新，請用 * 遮罩。

遮罩在這個選項能有更複雜的文法。將壓縮檔及檔案遮罩以兩條反斜線分隔: 壓縮檔遮罩\\檔案遮罩。遮罩也可以包含資料夾及子資料夾，以便更精準指定壓縮檔及檔案。您也可以在此使用環境變數。如果您想符合所有壓縮檔及所有檔案，是可以省略 '壓縮檔遮罩\\' 或 '檔案遮罩' 元件。

例如，*.rar\\*.txt 表示所有在 .rar 壓縮檔裡的 .txt 檔。*\\temp\* 或只是 temp\* 則符合在 'temp' 資料夾下壓縮檔內的所有檔案。%temp%\*\\* 或 %temp%\*\\ 則表示不要在 Windows 暫存資料夾中讓檢視器更新任何壓縮檔。

外部檢視工具名稱

如果您設定 [當按 Enter 時執行外部檢視工具] 選項時，您可在此輸入要當成檢視工具的程式名稱。要檢視的檔案名稱將會當成單一參數傳送給該程式。


[安全性] 設定對話方塊

要使用此對話方塊，請在 [選項] 選單選擇 [設定]，然後按 [安全性] 頁籤。對話方塊的內容如：

解壓縮時要排除的檔案類型

如果您啟用此選項，您可以指定下面輸入欄位中的潛在危險檔案遮罩。您可以輸入許多遮罩，中間用空白來區隔。WinRAR 在解壓縮或開啟壓縮檔時會跳過這些跟遮罩相符的檔案。

這個選項可以協助您防護感染病毒的信件夾檔，例如您輸入：

*.scr *.pif *.exe

則會防止使用者從 WinRAR 解壓縮、檢視或執行 .scr, .pif 及 .exe 檔案。

抹除暫存檔

這群選項控制 WinRAR 暫存資料夾內的刪除模式。處理已經存在的壓縮檔時會用得到暫存資料夾，也跟內部、外部檢視器的操作、執行已壓縮的檔案、或與拖放檔案解壓縮有關。

抹除暫存檔/永遠不要

如果選擇 [永遠不要]，則暫存檔會利用標準的系統刪除機制刪除，而這有可能被特殊的軟體還原。這是速度最快，但安全有虞的處理方式。

抹除暫存檔/每次都要

如果選擇 [每次都要]，則刪除之前會將 0 位元組複寫到該檔案磁區，避免還原的可能。這是顯然拖慢速度但安全的方案。

抹除暫存檔/僅限有加密者

如果選擇 [僅限有加密者]，當 WinRAR 發現壓縮檔含有加密的檔案，則會啟用安全且慢速的方式抹除暫存檔。否則則採用標準方式來刪除。

[抹除暫存檔] 選項註解

  • 請注意此方案適用於一般硬碟，但可能無法於固態儲存裝置取代檔案資料，因為 SSD 使用分層技術，用更複雜的資料處理方法。
  • 如果暫存檔還在使用中，WinRAR 可能無法立即刪除這些檔案，相對的，當您下次執行 WinRAR 時，所有一小時之前的暫存檔都會被刪除或抹除。同理，WinRAR 無法判斷暫存檔是否仍被外部程式佔用時也會如此處理。
  • 此選項只會作用於解壓縮之後建立的暫存檔。修改壓縮檔時產生的並不適用，因為這類檔案總是使用快速刪除法移除。

建議選擇防毒軟體

這個選項模擬 [壓縮檔防毒] 指令。預設值是打開的，所以 WinRAR 在啟動病毒掃描指令時會要求選擇防毒軟體的名稱。如果您只使用一種防毒軟體，您可以關掉此選項來跳過這個步驟。


[整合] 設定對話方塊

要啟動此對話方塊，在 WinRAR 的 [選項] 功能表 選擇 [設定... ] 指令並在 [整合] 選項上按一下。當安裝 WinRAR 時也有相同的選項設定，因此在安裝期間和安裝之後當可以在 WinRAR 設定值中設定下的敘述。

關聯 WinRAR 給 (RAR、ZIP 等壓縮檔)

您可以在此選擇 WinRAR 要作為什麼壓縮格式的預設檢視工具。保持這些選項的選擇是個相當好的建議，如此允許您只要在檔案總管或桌面上按兩下就能在 WinRAR 中開啟壓縮檔。[全部切換] 選擇所有項目，而已經選擇所有項目時，會改成全部不選。

使用者定義壓縮檔副檔名

只要 WinRAR 有支援，您可以自己指定壓縮檔的副檔名。執行的地方在 [設定] 對話方塊中，[整合] 頁的 [使用者定義壓縮檔副檔名]。例如，如果您有 ".dat" 副檔名的檔案，其實是 RAR 格式，您可以輸入 "dat" 讓 WinRAR 關聯，並且在檔案總管按右鍵也能支援 WinRAR 的功能。如果您要規定數個副檔名，請用空格作分隔。

該選項只能用於 WinRAR 的設定，不能用在 WinRAR 安裝程式。

介面/在桌面建立 WinRAR 捷徑

加入 WinRAR 圖示到桌面上。

介面/在 [開始] 功能表建立 WinRAR 捷徑

加入 WinRAR 圖示到 [開始] 功能表。

這個選項在 Windows XP 時會在傳統開始功能表的最上層加入 WinRAR 圖示。從 Windows Vista 起，程式圖示不能放在開始功能表的最上層，所以改放到 [所有程式] 中。如果您希望在 Windows Vista 及更新作業系統開始功能表最上層放置圖示，可以使用 [釘選到開始功能表] 功能。

介面/建立 WinRAR 程式組

在 [開始功能表/程式] 中建立 WinRAR 程式組

介面整合/整合 WinRAR 到系統介面

允許使用內容功能表和拖曳來控制 WinRAR 壓縮檔。

介面整合/使用階層式內容功能表

將檔案和壓縮檔案內容功能表全部功能加入到 WinRAR 子功能表中。

介面整合/選單內容顯示圖示

加入小圖示到 WinRAR 的檔案和壓縮檔案內容功能表。

介面整合/選單內容項目

選擇加在檔案總管內容功能表的項目。


壓縮設定檔

壓縮設定檔是在開始壓縮操作之前，用來快速獲得不同壓縮選項的設定值。它可替代在每一次需要建立新壓縮檔案時，所必須指定的壓縮檔案類型、分割檔案大小、壓縮方式和其他的選項等。您可以為您常用的壓縮操作典型建立數個設定檔儲存選項，並在往後從功能表選擇設定檔來還原全部的選項值。

壓縮設定檔在設定檔清單存有使用者賦予的名稱。您可以在 [壓縮檔名及參數] 對話方塊指定設定檔，只要按一下 [設定檔] 按鈕、在下拉選單選取想要的設定檔名稱，所有儲存在設定檔的資料就會出現。WinRAR 提供幾個預先定義的設定檔，例如建立電子郵件附檔及檔案備份等，要是您不需要也可以刪除它們。

有兩種方法可以建立新設定檔案。您可以打開 [壓縮檔名和參數] 對話方塊，設定所有想要的選項，按一下 [設定檔] 按鈕並選擇功能表功能中的 [儲存目前設定值成為新設定檔]。在出現的 [設定檔參數] 對話方塊包含設定檔案名稱區域，讓您可在此輸入新設定檔名稱，而一些設定檔選項也可在此對話方塊使用。最重要的選項是 [設定為預設設定檔]，如果您設定它，在每一次壓縮或更動壓縮檔之前此設定檔案便會被自動選擇。其他的選項則允許儲存壓縮檔和檔案名稱、在桌面上建立連結以及在選擇設定檔之後便立即執行壓縮。請讀取在 [設定檔選項] 對話方塊的敘述獲得關於這些選項的詳細內容。

第二種建立新設定檔的方法是在 [壓縮設定] 對話方塊按一下 [建立預設值] 按鈕。在這種狀況下，您只需要在出現的對話方塊內設定想要的壓縮選項，並按一下 [確定] 即可。利用這種方式建立的新設定檔將會變成預設的設定檔，並永遠命名為 [預設設定檔]。這不像第一種方式，此種方式不提供相關的進階設定檔案參數，如儲存壓縮檔和檔名、在桌面上建立捷徑。它適合用以簡便建立、沒有多餘問題的預設設定檔。但是如果您需要更靈活的應用時，請使用第一種方式。

您無法更改儲存在設定檔案內的壓縮選項，但是可以更改設定檔參數，例如它的名稱或預設狀態等。要編輯設定檔案參數或刪除已存在的設定檔，請使用管理設定指令，您可以從 [壓縮檔名和參數] 對話方塊內的 [設定檔] 功能表與 [壓縮設定] 對話方塊兩者之間找到此功能。使用此指令時，您可以設定新設定檔成為預設值或從全部的設定檔移除預設狀態。

您也可以在設定檔中儲存密碼，不過請注意這會用不安全的格式存在註冊機碼中。任何能存取您電腦的人都有可能可以取得這些儲存的密碼。


WinRAR.ini 檔案

預設的狀態下，WinRAR 將設定儲存在註冊機碼。這在安裝使用 WinRAR 於相同電腦時很合理，但如果要安裝 WinRAR 在移動式媒體中，例如 USB 隨身碟，在其他電腦執行，您應該比較想避免在其他電腦置入 WinRAR 的註冊機碼。

在 [匯入及匯出] 子選單的 [建立 WinRAR.ini 檔案] 指令會建立新的 WinRAR.ini 檔案並將 WinRAR 的設定從註冊機碼複製到此檔案。您必須將產生的檔案複製到與 WinRAR 相同的目錄或 %APPDATA%\WinRAR 目錄才能生效。

一般而言只有在離開的時候才會寫入 WinRAR.ini 檔，之前一直存在記憶體中。儲存的格式為大小寫有別，UTF-16LE 純文字格式，格式如下：

<根金鑰>\<金鑰名稱>=值

其中<根機碼>可以是 HKCU 代替 HKEY_CURRENT_USER, HKLM 代替 HKEY_LOCAL_MACHINE 或 Global 代替使用者自行定義的全域設定。值寫在引號裡面，位元矩陣則帶有 "bin:" 前置字元。

您可以修改全域設定來控制 WinRAR.ini 的行為。如果沒有停用 WinRAR.ini，WinRAR 會自動在下面寫入字串，您必須編輯 "=" 之後的參數來修改選項。這些字串寫在 WinRAR.ini 的上方。如果您打算設定唯讀屬性來預防寫入，則您可以手動在設定唯讀之前，加入適當的字串到 WinRAR.ini，一行一個指令。所以以上字串都使用 UTF-16LE 編碼格式，且大小寫有別，請輸入格式完全相同之字串。以下為可採用的全域設定：

Global\AppData=0

避免 WinRAR 存取 APPDATA%\WinRAR 資料夾。當指定 Global\AppData=0 時，所有檔案一般都會儲存在此資料夾，如註冊碼或面板等應該儲存在與 WinRAR.exe 相同的資料夾。指定 Global\Integration=1 可啟用系統整合功能。

Global\SaveSettings=0

當 WinRAR 轉向 HKEY_CURRENT_USER 及 HKEY_LOCAL_MACHINE 相關註冊機碼至 WinRAR.ini 時，還是會寫資料到 HKEY_CLASSES_ROOT 及其他與系統整合、檔案關聯相關的機碼位置。例如，使用整合設定對話方塊時。如果您想避免所有寫入註冊機碼的行為，請加入 Global/Integration=0 給 WinRAR.ini。如此 WinRAR 之後就不會變更系統設定。此指令也能避免建立或刪除 WinRAR 桌面捷徑及 WinRAR 程式組。

Global/SaveSettings=0

停用寫回當前設定至 WinRAR.ini，如此一來離開程式後這次的設定值就會消失。您也可以將 WinRAR.ini 檔案設定為唯讀，達到一樣的效果。因此您可以在第一次先將 WinRAR 做好設定，關閉 WinRAR 來儲存設定至檔案，最後加入 Global\SaveSettings=0 指令。根據 WinRAR.ini 的定義，此模式也可能影響其他 WinRAR 元件，如殼層延伸不會在內容選單項目對話方塊表現。指定 Global\SaveSettings=1 允許儲存設定到 WinRAR.ini。

注意

  • 跟其他註冊機碼不同："AppData" 變數不會轉問 WinRAR.ini，永遠會從註冊機碼讀取。此參數定義 %APPDATA%\WinRAR 資料夾路徑，既然 WinRAR.ini 也可以存在這個資料夾，我們必須在讀取 WinRAR.ini 之前就知道這個變數值。
  • 如果 winrar.ini 檔案放在跟 WinRAR 安裝程式相同的資料夾，則 winrar.ini 會在安裝之後複製到 WinRAR 程式的資料夾。


RAR.ini 檔案

如果我們要為指令行的開關建立預設值，可以把值放到 rar.ini 文字檔。該檔案可以存在與 WinRAR.exe 相同路徑或者 %APPDATA%\WinRAR 資料夾底下。

該檔包含以下格式字串：

switches=<任何用空白字元區隔的 WinRAR 開關>

也可以為個別 WinRAR 開關單獨設定指令，語法如下：

switches_<指令>=<任何用空白字元區隔的 WinRAR 開關>

大部分在 rar.ini 檔指定的開關只用在指令行模式。有些開關在操作介面跟指令行都通行。

範例

  1. 預設應用 -m5 -s 開關於指令行

switches=-m5 -s

  2. 使用 -m5 -s 開關給 "a" 指令，使用 -o+ 給 "x" 指令

switches_a=-m5 -s

switches_x=-o+


RAR 環境變數

使用 SET 指令，預設的選項可以加入到 RAR 的Windows 環境變數中。大多數在變數中指定的選項只能適用當 WinRAR 執行於指令行模式時，有些開關可同時使用於介面模式和指令行模式。

範例

指令

SET RAR=-s -m5 -md64m

當執行於指令行模式時，將會強制 WinRAR 建立結實壓縮檔並使用最佳壓縮方式和 64 MB 的字典檔。


登錄變數

在多人使用的環境中，為了安全考量停用某些 WinRAR 的的功能可能很重要。如果您需要這麼做，請建立登錄機碼：

HKEY_LOCAL_MACHINE\Software\WinRAR\Policy

或

HKEY_CURRENT_USER\Software\WinRAR\Policy

在 HKEY_LOCAL_MACHINE 建立則比 HKEY_CURRENT_USER 具有高優先權。

這個機碼包括下列項目:

值名稱 | 值類型 | 描述
Menu | DWORD | 設成 0 則停用 WinRAR 選單。
Settings | DWORD | 設成 0 則停用 [設定] 對話方塊、[匯入或匯出] 子選單指令及工具列內容選單。
Password | DWORD | 設成 0 則不能變更壓縮檔密碼。這可以避免對重要檔案不當加密。
OrgPasswords | DWORD | 設成 0 則無法存取 [整理密碼] 對話方塊。但它不會禁止存取在此對話方塊已經儲存的密碼，所以您應該在設定 OrgPasswords 變數前先把密碼清乾淨。
Shutdown | DWORD | 設成 0 則停用 [完成時] 壓縮選項，這樣使用者就無法從這裡令電腦關閉、休眠、睡眠或重新啟動電腦。
基準測試 | DWORD | 設成 0 則停用基準測試指令。在多人共用電腦的環境下，「基準測試」指令會佔據太多運算資源。

WinRAR 原則改變之後可能需要重新開啟才能生效。原則機碼不會影響 RAR 指令行 (rar.exe 檔)，所以在多人使用的環境中，為了安全您可以刪除 Rar.exe，保留 WinRAR.exe 就好。

WinRAR 參考 HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer 註冊機碼的 NoDrives DWORD 值作為隱藏一個以上磁碟的依據。設為 1 則隱藏 A:，2 隱藏 B:，4 隱藏 C:，依此類推。也可以隱藏多磁碟，例如 10 進為 12 (4 + 8) 會隱藏 C: 碟跟 D: 碟。

另外您也可以改寫 %APPDATA%\WinRAR 資料夾路徑，只要在 HKEY_CURRENT_USER\Software\WinRAR\Paths 註冊機碼中指定 AppData 的值為另外 WinRAR 套裝的路徑就可以了。


RARFILES.LST - 在結實壓縮檔設定檔案順序

結實壓縮檔案中的檔案通常是以副檔名作排序的，也可以使用指定的檔案 rarfiles.lst (此檔案必須在 %APPDATA%\WinRAR folder 資料夾) 設定替用的檔案順序。它在 WinRAR 中已有提供，但是也可以根據使用者的需要自定義。這是個純文字檔案，定義當結實壓縮檔案建立時的檔案順序。檔案 rarfiles.lst 可包含檔案名稱、萬用字元和特別的功能 - $default；檔案順序清單在與 rarfiles.lst 沒有其他符合功能時的預設替換項目標定義。

提供增進壓縮性能和速度操作的秘訣：

  • 可能的話在壓縮檔案中將類似的檔案群組在一起；
  • 頻繁使用的檔案放在起始的位置上。

一般來說遮罩放在清單的上方具有較高的優先權。但這有一個例外。如果 rarfiles.lst 包含兩個遮罩，其中合乎其中一個遮罩的所有檔案也合乎另一個遮罩，則符合數量較少的會有較高的優先權，不管在清單中的位置。例如，如果有 *.cpp 及 f*.cpp 遮罩，f*.cpp 擁有較高的優先權。所以 'filename.cpp' 的位置會參照 'f*.cpp'，不是 '*.cpp'。

範例：

這是一個 rarfiles.lst 的簡易範例

file_id.diz
readme.*
*.doc
*.txt
*.hlp
*.inf
*.exe
*.dll
$default
*.rar


圖形介面 RAR 和 ZIP 自解檔模組 (Default.SFX 和 Zip.SFX)

使用這兩種模組您可以建立 GUI (圖形模式) 32 位 Windows 版本(XP 以上等等) 的自我解壓縮檔，這些模組無法在 Windows 3.1 或 DOS 下執行。

使用 Default.SFX 模組於 RAR 壓縮檔而 Zip.SFX 用於 ZIP 壓縮檔。

這些模組均支援簡易的安裝指令，按一下下面的連結可獲得詳細敘述。

  • 自解檔安裝指令
  • 自解檔指令行選項

注意

  1. 在自解檔模組包含的 Windows 資源是可以修改成您所需要的樣子的。例如，您可以調整對話方塊大小或在起始對話方塊中顯示您希望的點陣圖。WinRAR 並不提供修改資源的工具或檔案，這有一點複雜，如果您要如此做的時候，您必須有資源編輯器，並要熟悉怎麼操作。但如果標準的自解檔對話方塊即可滿足您的話，您就不需要再修改資源。如果您只是想修改自解檔圖片或圖示，您可以使用 [進階自解檔選項] 對話方塊中的 [文字及圖示] 頁籤。
  2. 預設的狀況下，從圖形介面自解檔結束時傳回的結束代碼，應與 WinRAR 結束代碼相同。也可以使用 SetupCode 指令修改此行為，讓自解檔也能傳回安裝程式結束代碼。


圖形介面自解檔模組：安裝指令

WinRAR 圖形介面自解檔模組支援簡單安裝指令。您可以將安裝指令敘述加入到自解檔壓縮檔註解 中。下面是 安裝指令的敘述，在指令上按一下可獲得詳細敘述。

Delete | 解壓縮前先刪除檔案
License | 顯示程式的使用授權協定
Overwrite | 選擇檔案的覆寫模式
Path | 設定預設目標路徑
Presetup | 指定解壓縮前執行的程式
SavePath | 儲存目的地路徑
Setup | 指定解壓縮後執行的程式
SetupCode | 等候安裝程式結束並傳回其結束代碼
Shortcut | 建立解壓縮檔案的捷徑
Silent | 跳過起始對話方塊
TempMode | 解壓縮檔案到暫存資料夾
Text | 加入純文字到自解檔對話方塊文字視窗
Update | 選擇檔案更新模式
Title | 設定自解檔對話方塊標題

自解檔模組於指令參數延伸環境變數，因此可以使用下列的指令:

Path=%temp%\myapp

Setup=mysetup.exe %sfxpar%

(請參閱 Setup 取得 sfxpar 變數描述)。

這裡您可以檢視完整安裝指令碼的簡易範例。


圖形介面自解檔模組：指令行選項

WinRAR 圖形介面自解檔模組支援下列幾種指令行選項。

選項 | 敘述
-d<路徑> | 設定解壓縮案存放的路徑。
-p<密碼> | 指定密碼來為自解檔加密。
-s, -s1, -s2 | 安靜模式。選項 -s 係 -s1 的簡要格式。-s 及 -s1 兩者都隱藏自解檔視窗及解壓縮進度。-s1 也會隱藏 [版權] 對話方塊。-s2 隱藏起始對話方塊，但是會顯示解壓縮進度。
-sp<參數> | 如果 Setup 自解檔模組沒有參數，則您可以自行定義此開關來傳送參數給應用程式。自解模組 -sp<參數> 開關只會在自解指令行的 "Setup" 指令沒有指定其他如果 Setup 指令已經包含參數，則會忽略此開關。安裝應用程式能從 sfxcmd 環境變數讀取完整的自解檔指令。自解模組設定 "sfxpar" 變數只包含指令行參數，不包含引導的自解模組名稱。

您可以在 WinRAR 圖形自解檔模組的指令行參數使用雙引號。如果您要使用，請輸入連續兩個雙引號。


主控台 RAR 自解檔模組 (WinCon.SFX)

使用此模組，您可以建立自我解壓縮檔，可以在 Windows 命令提示字元解開。這個模組無法在 MS DOS 下執行。

WinRAR x64 也包含 WinCon64.SFX，是個 64 位元的自解模組。預設值為 WinRAR x64 使用 32 位元版，但您可以手動改選 64 位元模組於自解檔選項：模組對話方塊。使用 64 位元自解模組的結果只能在 Windows x64 中使用。

此模組支援下列的指令行開關：

-e 從壓縮檔案解壓縮 (預設動作)

-t 測試壓縮檔案

-v 壓縮檔內容詳細清單

-? 顯示說明

從指令行自解檔回報的結束代碼與 WinRAR 結束代碼相同。


常見問題集

常見問題清單

問： 我一直不瞭解如何使用 WinRAR 來解壓縮檔案。

問： RAR 包含許多種不同的壓縮方法，什麼是使用它們的有利和不利條件，又您可否建議哪一個適合於每天使用呢？

問： 我常聽到許多關於「結實」的壓縮檔案，到底它們是什麼？我該如何使用它們？

問： 我的網站 (電子郵件系統，FTP 伺服器等) 使用者如何在 RAR 共享軟體的 40 天試用期限屆滿之後，從 RAR 壓縮檔案解壓縮檔案呢？

問： 哪裡可以獲得最新版本的 WinRAR？

問： 當解壓縮時，我收到「雜湊驗證錯誤」的資訊，它代表什麼意思？

問： 我從多重結實的分割檔案壓縮 RAR 檔案中解壓縮時失敗，其中一個壓縮分割檔案損壞。救命啊！

問： 我忘記我的密碼請幫幫我！

問： 為什麼 WinRAR 不能刪除在 Windows 暫存資料夾中的暫存檔案?

問： 為什麼 WinRAR 不能在我的壓縮檔案中使用最大值的字典檔?

問題和答覆

問：我一直不瞭解如何使用 WinRAR 來解壓縮檔案。

答：請讀取 圖形介面和指令行模式 主題。它包含以數種不同的方式來解壓縮的指引。

問：RAR 包含許多種不同的壓縮方法，什麼是使用它們的有利和不利條件，又您可否建議哪一個適合於每天使用呢？

答：此問題我回答於說明主題的怎樣最佳化壓縮設定中。

問：我常聽到許多關於「結實」的壓縮檔案，到底它們是什麼？我該如何使用它們？

答：請參閱主題結實壓縮檔案

問：我的網站 (電子郵件系統，FTP 伺服器等) 使用者如何在 RAR 共享軟體的 40 天試用期限屆滿之後，從 RAR 壓縮檔案解壓縮檔案呢？

答：在 RAR 散佈的壓縮檔案中包含一個免費的 unRAR 公用程式，UNRAR.EXE，可任意使用，而不需要付授權費用，只要任何人有需要從 RAR 所建立的壓縮檔案解壓縮時。這就像附加的「紅利」一般，部分的 UNRAR 原始碼可在下列網址獲得 www.rarlab.com。請注意，RAR 的運算法是私人資產，您不得以 UNRAR 原始碼將它做反向還原工程。

問：哪裡可以獲得最新版本的 WinRAR？

答：請拜訪 WinRAR 首頁 www.rarlab.com

問：當解壓縮時，我收到「雜湊驗證錯誤」的資訊，它代表什麼意思？

答：因為壓縮檔案受損或是硬體問題的其中一種讓解壓縮的檔案損壞，但有修復記錄時，您可以試著修復它，除此外是不可能修復受損的資料的。請注意，在結實壓縮檔案的情況下，受損檔案之後的全部檔案將會失去。

問：我從多重結實的分割檔案壓縮 RAR 檔案中解壓縮時失敗，其中一個壓縮分割檔案損壞。救命啊！

答：如果您的壓縮檔具有修復分割檔，請放置於 RAR 分割檔的資料夾中，然後點兩下第一個修復分割檔 (REV 檔) 開始修復。
如果沒有修復分割檔或修復分割檔沒幫助，請試著對毀損的分割檔利用修復指令，然後對修復的分割檔 fixed.arcname.rar (如果找不到修復記錄則為 rebuilt.arcname.rar) 重新命名為原本的分割檔名，從第一個分割檔開始，重新解壓縮看看。
如果您希望增加您 RAR 分割檔遇到毀損時能成功修復的機會，請在建立分割檔時套用修復記錄的功能，最好避免使用結實壓縮模式，權衡非結實壓縮造成的較低壓縮率。

問：我忘記我的密碼請幫幫我！

答：WinRAR 加密並沒有任何的後門程式。即使我自己的任何壓縮檔案，如果我忘記密碼，我也無法將它們修復。所以在這種狀況下請不要要求我幫忙您。

問：為什麼 WinRAR 不能刪除在 Windows 暫存資料夾中的暫存檔案?

答：它是在您使用拖曳來解壓縮檔案或用外部檢視工具打開被壓縮的檔案時產生的。在某些情況下 WinRAR 關閉後檔案可能仍然被使用，沒有好辦法來預測外部程是否仍然需要這些解壓縮的檔案。所以 WinRAR 不會立即刪除它們，相反，當您下一次執行 WinRAR 時，所有的超過一小時的暫存資料夾會被刪除。
如果您解壓縮檔案時根本不想使用暫存資料夾，也可以在 WinRAR 的圖形模式用 [解壓縮到] 指令或用內容功能表的 [解壓縮到] 項目，而不要用拖曳。

問：為什麼 WinRAR 不能在我的壓縮檔案中使用最大值的字典檔?

答：即使您在壓縮設定中指定最大值的字典檔大小，在建立新的壓縮檔案時如果總的達到的資料大小少於字典檔大小的兩倍，WinRAR 可以自動減少這個值。它不會損害壓縮並會減少記憶體的需要。


提示

如何從壓縮檔安裝應用程式

您可以直接從壓縮檔中安裝或是執行應用程式，只要進入壓縮檔後在 setup.exe 或 install.exe 程式上按 Enter 就行了。當在有 .exe 副檔名的壓縮檔按 Enter 時，WinRAR 會解壓縮檔案的整個內容到暫存資料夾中，並執行該執行檔。當執行檔中止時，WinRAR 會測試解壓縮的檔案的修改的日期，看是否有任何的檔案被更新或是新建，然後提供更新檔案給壓縮檔，之後刪除暫存資料夾和它的內容。

如果您要以 WinRAR 控制壓縮檔案，但是壓縮檔案關聯已經被其他程式更改時

有些程式在未經詢問下，會自行將它們自己設為預設的壓縮檔案檢視工具。如果有此狀況，而您要重新註冊 WinRAR，請在 [選項] 功能表的 [設定... ] 功能，啟動 [整合設定] 對話方塊 ，然後選擇要關聯給 WinRAR 的壓縮格式，然後按 Enter。

如何以不詢問模式安裝 WinRAR

如果您必須安裝 WinRAR 到為數不少的電腦時，屢屢的詢問安裝問題可能令人覺得很煩，在這種狀況下您可以執行 WinRAR 安裝並加上選項 -s 來跳過全部的問題並使用預設值代替。


使用者授權合約

淺藍科技公司為 WinRAR 在台灣與中國地區之總代理，網址 www.rar.com.tw。

中文版翻譯僅供參考。實際規定以下列英文條文為準。

本授權合約係 RAR (包括其視窗版本 - WinRAR) 壓縮軟體 (以下簡稱軟體) 用以規範 win.rar GmbH (以下簡稱授權方) 與安裝、存取或其他任何使用此軟體的使用者(以下簡稱使用者) 之條文。

  1. 作者暨著作權所有人為 Alexander L. Roshal。授權方，亦即簽發授權者，亦即全球獨家使用權持有者包含重製權、發售及以能任何形式公開發佈者為 win.rar GmbH, Marienstr. 12, 10117 Berlin, Germany
  2. 本軟體係以先試用後購買的形式發售，此定義為使用者在最多 40 天以內試用本軟體皆屬免費，在試用期滿後，使用者須購買授權才能繼續使用。
  3. 本軟體除以下例外條件，皆能在不以任何形式更動原始封裝的條件下自由傳播。
    1. 無書面授權者不得拆解本軟體封裝後加以傳播，但 UnRAR 元件例外。
    2. 無書面授權者不得將未授權的試用版包裝於其他軟體之中。
    3. 未更動的 WinRAR 安裝檔必須單純提供，不得與任何軟體搭配。任何搭售為禁止行為。未經 win.rar GmbH 書面同意，任何形式的搭售，特別是使用下載或安裝之軟體為禁止的行為。
    4. 散播試用版者不得收錄、轉介或暗示駭客、破解、註冊金鑰或金鑰產生器等。
    5. 倘若違反上述條件，則授權條件即自動立刻失效。
  4. 本軟體試用版得顯示提醒註冊之對話方塊。根據軟體版本或設定的不同，此對話方塊得包含本機預先定義的文字及連結，或自網際網路下載之網頁。此網頁得包含授權指引或其他授權方自行選擇的內容，包含廣告。當開啟網頁時，本軟體僅能傳輸 HTTP 通訊協定下，讓網頁順利開啟必要的技術性參數。
  5. 本軟體依原樣散佈，無明示或暗示任何保固，您必須自行負擔使用的風險。作者、授權方及授權方的代理者皆無須為使用或不當使用本軟體造成的資料遺失、毀損、利潤損失或其他任何損失負責。
  6. 本軟體有兩種基本授權型式。如下:
    1. 單一電腦使用授權。使用者購買一個授權，在一台電腦使用本軟體。
      家庭使用者得將單一電腦使用授權應用於購買授權者本人之所有電腦及行動裝置 (如 USB 磁碟、外接硬碟等)。
      商業使用者須遵守一台電腦或行動裝置安裝一份授權的規定。
    2. 多使用授權。使用者一次購買多個授權，可以提供購買者及購買者的員工在相同數量的電腦使用。
      在網路 (伺服器與用戶端) 的環境下，使用者必須購買與用戶端 (工作站) 相同數量的授權，用以安裝、使用或存取。與用戶端 (工作站) 相等數量的授權為必要條件，不考慮是否同時間或不同時間用到本軟體。例如您在網路有 9 台用戶端 (工作站)，則必須購買 9 份授權。
      在合法使用的目的下，購買授權之使用者得在購買數量與符合以上定義數量之電腦下，無條件使用本軟體。
  7. 除上述授權費用外，建立及散播 RAR 壓縮檔、分割檔、自解檔及分割自解檔等，皆無須付費。授權所有人得利用同等授權數量之本軟體產生壓縮檔及自解檔，無其他限制，自由散佈之。
  8. 本授權軟體不得租借，但得永久轉移至第三方，且第三方須同意授權合約。
  9. 欲購買授權，請閱讀本軟體附帶之 order.htm 檔。
  10. 除本合約規範之條件外，您不得使用、複製、模擬、重製、租用、借用、轉售、修改、反組譯、拆解、任何逆向工程、或移轉已授權之軟體或授權之軟體之部分。任何此類未經授權之使用及自動立即中止本合約，且可能構成犯罪要素或遭起訴。
    任何 RAR 二進位碼、WinRAR 二進位碼、UnRAR 原始碼及 UnRAR 二進位碼皆不得在沒有取得書面同意之下，用以或逆向工程用以重新建立 RAR 專利演算法。
    本軟體或有使用某些元件，來自於第三方開發或授權件。詳情請參閱 WinRAR 說明檔《致謝》章節，或其他 RAR 版本的 acknow.txt 文字檔。
  11. 本授權合約係僅基於德國法律撰寫。如果您是零售商，win.rar GmbH 於德國柏林註冊之法庭具有唯一優先裁量權，用以仲裁違反本授權合約或相關之爭論。
  12. 安裝及使用本軟體即表示同意本合約之條文。如果您不同意本合約條文，您必須自您的儲存裝置完全移除本軟體之所有檔案並終止使用本軟體。

(以下為英文條文)

END USER LICENSE AGREEMENT

The following agreement regarding RAR (and its Windows version - WinRAR) archiver - referred to as "software" - is made between win.rar GmbH - referred to as "licensor" - and anyone who is installing, accessing or in any other way using the software - referred to as "user".

  1. The author and holder of the copyright of the software is Alexander L. Roshal. The licensor and as such issuer of the license and bearer of the worldwide exclusive usage rights including the rights to reproduce, distribute and make the software available to the public in any form is win.rar GmbH, Marienstr. 12, 10117 Berlin, Germany.

  2. The software is distributed as try before you buy. This means that anyone may use the software during a test period of a maximum of 40 days at no charge. Following this test period, the user must purchase a license to continue using the software.

  3. The software's trial version may be freely distributed, with exceptions noted below, provided the distribution package is not modified in any way.

    1. Nobody may distribute separate parts of the package, with the exception of the UnRAR components, without written permission.

    2. The software's unlicensed trial version may not be distributed inside of any other software package without written permission. The software must remain in the original unmodified installation file for download without any barrier and conditions to the user such as collecting fees for the download or making the download conditional on the user giving his contact data.

    3. The unmodified installation file of WinRAR must be provided pure and unpaired. Any bundling is interdicted. In particular the use of any install or download software which is providing any kind of download bundles is prohibited unless granted by win.rar GmbH in written form.

    4. Hacks/cracks, keys or key generators may not be included, pointed to or referred to by the distributor of the trial version.

    5. In case of violation of the precedent conditions the allowance lapses immediately and automatically.

  4. The trial version of the software can display a registration reminder dialog. Depending on the software version and configuration such dialog can contain either a predefined text and links loaded locally or a web page loaded from the internet. Such web page can contain licensing instructions or other materials according to the licensor's choice, including advertisement. When opening a web page, the software transfers only those parameters which are technically required by HTTP protocol to successfully open a web page in a browser.

  5. The software is distributed "as is". No warranty of any kind is expressed or implied. You use at your own risk. Neither the author, the licensor nor the agents of the licensor will be liable for data loss, damages, loss of profits or any other kind of loss while using or misusing this software.

  6. There are 2 basic types of licenses issued for the software. These are:

    1. A single computer usage license. The user purchases one license to use the software on one computer.

      Home users may use their single computer usage license on all computers and mobile devices (USB drive, external hard drive, etc.) which are property of the license owner.

      Business users require one license per computer or mobile device on which the software is installed.

    2. A multiple usage license. The user purchases a number of usage licenses for use, by the purchaser or the purchaser's employees on the same number of computers.

      In a network (server/client) environment the user must purchase a license copy for each separate client (workstation) on which the software is installed, used or accessed. A separate license copy for each client (workstation) is needed regardless of whether the clients (workstations) will use the software simultaneously or at different times. If for example you wish to have 9 different clients (workstations) in your network with access to RAR, you must purchase 9 license copies.

    A user who purchased a license, is granted a non-exclusive right to use the software on as many computers as defined by the licensing terms above according to the number of licenses purchased, for any legal purpose.

  7. There are no additional license fees, apart from the cost of the license, associated with the creation and distribution of RAR archives, volumes, self-extracting archives or self-extracting volumes. Owners of a license may use their copies of the software to produce archives and self-extracting archives and to distribute those archives free of any additional royalties.

  8. The licensed software may not be rented or leased but may be permanently transferred, in its entirety, if the recipient agrees to the terms of this license.

  9. To buy a license, please read the file order.htm provided with the software for details.

  10. You may not use, copy, emulate, clone, rent, lease, sell, modify, decompile, disassemble, otherwise reverse engineer, or transfer the licensed software, or any subset of the licensed software, except as provided for in this agreement. Any such unauthorized use shall result in immediate and automatic termination of this license and may result in criminal and/or civil prosecution.

    Neither RAR binary code, WinRAR binary code, UnRAR source or UnRAR binary code may be used or reverse engineered to re-create the RAR compression algorithm, which is proprietary, without written permission.

    The software may be using components developed and/or copyrighted by third parties. Please read "Acknowledgments" help file topic for WinRAR or acknow.txt text file for other RAR versions for details.

  11. This License Agreement is construed solely and exclusively under German law. If you are a merchant, the courts at the registered office of win.rar GmbH in Berlin/Germany shall have exclusive jurisdiction for any and all disputes arising in connection with this License Agreement or its validity.

  12. Installing and using the software signifies acceptance of these terms and conditions of the license. If you do not agree with the terms of this license, you must remove all software files from your storage devices and cease to use the software.


訂購資訊

您需要訂購 WinRAR，因為成為訂購用戶時，您可以

  1. 鼓勵作者並發展及增進 WinRAR 的功能，製作新的 WinRAR 版本;
  2. 可在商業或是其他環境下使用 WinRAR;
  3. 獲得支援及幫助，透過電子郵件及 WinRAR 支援地點，全球資訊網。

該怎麼訂購

如果您使用 WinRAR 超過評估期 40 天，您需要向各地總代理購買授權，也可以在 PCHome、軟體王、SoSoft 線上訂購。您也可以在 www.rar.com.tw 網站上查詢最新的報價。

您也可以透過銀行電匯付款，繳款後將單據資料傳至本註冊處即可，我們收到您的申請後，會盡快處理，由於是國際訊息往來，我們估計最慢一週之內會寄給您註冊碼。

  1. 銀行電匯
    台北一信萬華分社 帳號: 017221049187-0 戶名: 淺藍科技有限公司

銀行電匯付款後怎麼完成註冊手續？

  1. 如果您可以使用電子郵件:
    請寫一封電子郵件給 order@rar.com.tw，內容需註明希望的註冊名稱、註冊件數、姓名、地址或電子郵件信箱，以及郵局或銀行單據號碼。
  2. 如果您要使用傳真:
    請註明希望的註冊名稱、註冊件數、姓名、地址或電子郵件信箱，連同郵局或銀行單據傳真給本註冊處: (02)2307-4763
  3. 如果您要用一般郵件傳遞:
    請註明希望的註冊名稱、註冊件數、姓名、地址或電子郵件信箱，連同郵局或銀行單據影本寄到:
    台北市萬華區寶興街 80 巷 2 號 3 樓 RAR 註冊處 收

關於希望的註冊名稱，只能用英文。我們建議您不要使用節點號碼、電話號碼或其他可能會改變的資料。AV (憑證驗證) 識別碼長度要在 5 - 45 個字元之間，而且不可以包含底線字元 "_" 與角括弧 ">" 或 "<"。

在收到註冊費用後您會收到一封電子郵件，其中含有註冊檔，該註冊檔是根據您希望的註冊名稱產生的。請務必提供有效的電子郵件信箱以便寄送註冊資料。

訂購程序

當以上地點收到您的訂購費用及完整的訂購單時，您將會收到與您註冊單字串相符一致的註冊碼檔案。

而上述您所收到的註冊碼檔案，您必須將之放入到 %APPDATA%\WinRAR 資料夾。如果檔案是壓縮過的 .RAR 檔案，為了註冊您的 WinRAR，您必須將它從壓縮檔解開。

在您當地訂購地點的便利性考量之下，以電子郵件遞送註冊碼或是以當地的郵政服務來寄送磁片都是可能的。


%APPDATA%\WinRAR folder

Old WinRAR versions stored supplementary files like a registration key, exported settings file settings.reg, themes or log file in the same folder as WinRAR executable. In Windows Vista and following Windows versions it is not recommended to store such data in the program folder. Software may even fail when trying to do it. Recommended locations for application data are subfolders of so called %APPDATA% folder.

Real path to %APPDATA% depends on Windows version. To open %APPDATA% folder do the following: run Windows Explorer or open "My Computer" window, type %APPDATA% in address bar and then press Enter. WinRAR stores its files in "WinRAR" subfolder of %APPDATA%. You may enter %APPDATA%\WinRAR in Windows Explorer address bar to go directly to WinRAR data folder.

Situations when you need to access %APPDATA%\WinRAR manually are rare. Samples of such situations may include copying settings.reg to another computer or browsing the error log file with some external viewer.

Note that WinRAR tries to search the registration key and settings.reg file both in %APPDATA%\WinRAR and in WinRAR program folder, with %APPDATA%\WinRAR having precedence.

If you need to override the location of %APPDATA%\WinRAR, you can set the string value "AppData" in Registry key HKEY_CURRENT_USER\Software\WinRAR\Paths containing a new path to WinRAR supplementary files.


Archive comment

You may add an optional text information to RAR and ZIP archives. This information is called an archive comment. To add it manually in WinRAR shell mode to the already existing archive use Add archive comment command, to read the comment from a file in the command line - command "c" or switch -z<file>.

You also may specify a comment when archiving files directly in the Archive name and parameters dialog.

If an archive, which contains a comment, is opened in WinRAR and the option "Show archive comment" in General settings dialog is on, the comment window will be displayed to the right of the files list. You may change the width of the comment window, dragging its left border with the mouse.


Encryption

Both RAR and ZIP formats support encryption. To encrypt files you need to specify a password before archiving or directly in the Archive name and parameters dialog. In the command line this is done by using switch -p[pwd]. In WinRAR shell, to enter a password you may either press Ctrl+P or select the "Set default password" command in File menu or click on the small icon of a key in the bottom left corner of the WinRAR window. To enter a password in Archive name and parameters dialog press "Set password" button in "Advanced" set of options.

Unlike ZIP, RAR format allows to encrypt not only file data, but also other sensitive archive areas: file names, sizes, attributes, comments and other blocks. If you wish to do it, you need to set "Encrypt file names" option in the password dialog or in the command line mode use the switch -hp[pwd] instead of -p[pwd]. Without a password it is impossible to view even the list of files in archive encrypted in such mode.

Solid RAR archives and archives with encrypted file names can have only one same password for all archived files. Files in non-solid RAR archives without name encryption and in ZIP archives can use different passwords.

Do not forget to remove an entered password, when it is no longer needed, otherwise you may occasionally archive some files using the password without wishing to. To remove a password, enter an empty string instead of a password or close WinRAR and start it again. While a password exists, the icon of key is red, otherwise it will be yellow. Also, when you start an archive operation using a password, title bar of Archive name and parameters dialog flashes twice.

If you enabled "Use for all archives" option in password dialog and entered the empty string as a password, extract and test commands will skip all encrypted files and archives. In this mode the icon of key in WinRAR status bar is not displayed.

You do not need to remove a password if you entered it directly in Archive name and parameters dialog. Unlike other ways such password is valid only for the single archiving operation and automatically removed after its completion.

When extracting encrypted files, it is not necessary to enter the password before starting the operation, though you may do so. If a password was not entered before extraction and WinRAR encounters an encrypted file, the password will be requested from the user.

RAR archives are encrypted with AES-256 algorithm in CBC mode for RAR 5.0 archives and AES-128 in CBC mode for RAR 4.x archives. RAR 5.0 key derivation function is based on PBKDF2 using HMAC-SHA256.

By default ZIP archives use AES-256 algorithm in CTR mode. But such archives can be incompatible with some older unzip tools. You can set "ZIP legacy encryption" option in the password dialog to enable the legacy ZIP encryption, which is less strong than AES, but provides better compatibility with older software.

Even though WinRAR allows to use AES-256 both in RAR and ZIP formats, key derivation function parameters selected in RAR are expected to make RAR encryption implementation more resistant to brute force attack. Also RAR allows to encrypt file names and other file properties. If you need to encrypt sensitive information, it is better to select RAR archive format. For real security use at least 8 character long passwords. Avoid common words in passwords, they make a password weaker. Passwords are case sensitive. Maximum password length is 127 characters. Longer passwords are truncated to this length.

If "Encrypt file names" option is off, file checksums for encrypted RAR 5.0 files are modified using a special password dependent algorithm. It is important, because otherwise it could be possible to guess file contents based on a checksum value only, without knowing a password. Such risk would be especially high for short files or for strong BLAKE2 checksum. So do not expect checksums for encrypted RAR 5.0 files to match actual CRC32 or BLAKE2 values. If "Encrypt file names" option is on, checksums are stored without modification, because they can be accessed only after providing a valid password.

Remember that if you lose your password, you will be unable to retrieve the encrypted files, not even the WinRAR author is able to extract encrypted files.


Locking archives

RAR archive format allows to lock archives. WinRAR cannot modify locked archives, so locking important archives prevents their accidental modification by WinRAR. Such protection might be especially useful in case of WinRAR commands processing archives in groups.

Archive locking is not intended or able to prevent modification by other tools or willful third party. It implements a safety measure only for accidental data change by WinRAR.

Use "Lock archive" command in WinRAR shell mode or command "K" in the command line to lock an archive.


How to choose optimal archiving settings

When creating a new archive, you are presented with several compression related parameters on General options page of "Archive name and parameters" dialog. Firstly you need to select the archive format, which can be RAR, ZIP or RAR4. ZIP is preferable if you are not sure that receiver of your archive has WinRAR or other software able to unpack RAR archives. Otherwise it is recommended to choose RAR, which supports more functions and higher compression. RAR4 is a previous version of RAR format, which lacks some important changes like AES-256 encryption, more efficient recovery record, larger dictionary sizes introduced by RAR5 format in WinRAR 5.0 in 2013. Some older tools including WinRAR versions prior to WinRAR 5.0 are not able to decompress archives in latest RAR format. If you wish to create RAR archives compatible with such software, you can select RAR4 option.

Regardless of the archive format the next step is selection of compression method. You can choose among "Store", "Fastest", "Fast", "Normal", "Good" and "Best" methods. "Best" provides highest, but slowest compression, "Fastest" compresses poorly, but is very fast, "Store" adds files to archive with maximum possible speed, but without any compression. "Fastest" might be more suitable for daily backups, "Best" for Internet distribution, "Normal" for everyday use like compressing email attachments.

If you selected the ZIP archive format, your preparations are finished at this stage. In case of RAR and RAR5 there are two more important options affecting compression: dictionary size and solid archiving mode.

Compression dictionary is the memory area used by compression algorithm to find and compress repeated data patterns. Larger dictionary frequently improves compression of big files, especially in solid mode, but it also leads to slower compression and higher memory requirements. Normally we recommend to use 4 MB dictionary for RAR format and 32 MB for RAR5 (RAR 5.0) archive format. You can read more about the dictionary size here.

"Create solid archive" option compresses files as single contiguous data stream resulting in higher compression ratio when processing many small similar files. But it also reduces speed of further archive modifications and increases amount of data loss in case of archive damage. This mode is explained in details Solid archives topic.

These are all the main settings, which affect compression ratio and speed. Actually, you do not need to set them before every archiving. Simply select your favorite default values once in the default compression profile, which can be created in Compression settings dialog.


Archiving with password

In this dialog you may enter a password, which will apply to the archive, which you are going to create now. The entered password will be active during only one current archiving operation. If you need a global password instead, you may enter it using "Set default password" command in File menu.

If "Show password" option is disabled, you will be asked to type the password twice to ensure correctness.

If you set "Encrypt file names" option, WinRAR will encrypt not only file data, but all other sensitive archive areas like file names, sizes, attributes, comments and other blocks, so it provides a higher security level. Without a password it is impossible to view even the list of files in archive encrypted with this option. This option is available only when compressing data to RAR archive, it is not supported for ZIP format.

"ZIP legacy encryption" option is available only when adding files to ZIP archive. It enables use of ZIP legacy encryption algorithm. If this option is turned off, ZIP archives are encrypted with AES-256, which is more secure, but can be incompatible with some older versions of unzip tools.

If you already saved some passwords, you can access them either using the drop down list associated with "Enter password" field or utilizing the autocomplete feature. Press "Organize passwords..." button to open "Organize passwords" dialog, where you can save frequently used passwords.

If saved passwords are protected with master password, you need to enter the master password and press "OK" to access them. If entered password does not match the master password, this dialog will treat it as a usual password for archive operations.


Protecting archives from damage

RAR archive format supports a special type of redundant data called the recovery record. Presence of recovery record makes an archive larger, but allows to repair it even in case of physical data damage due to disk failure or data loss of any other kind, provided that the damage is not too severe. Such damage recovery can be done with Repair archive command. ZIP archive format does not support the recovery record.

Set "Add recovery record" option in Archive name and parameters dialog to add the recovery record to archive. Another approach is to enable "Add recovery record" option in the default compression profile. In this case the recovery record will be added to archives after any archive modification.

If you need to add the recovery record in the command line mode, please read descriptions of rr[N] command and -rr[N] switch, which can be used for this purpose.

RAR 5.0 recovery record uses Reed-Solomon error correction codes. Its ability to repair continuous damage is about the same as for RAR 4.x, allowing to restore slightly less data than recovery record size. But it is significantly more efficient than RAR 4.x record in case of multiple damaged areas.

RAR 4.x recovery record consists of 512 byte sectors and cannot contain more than 524288 sectors. So its useful size and data recovery ability are limited to 256 MB. In case of RAR 5.0 format the recovery record can be as large as archive itself.

You can specify the recovery record size in Advanced options of "Archive name and parameters" dialog as a percent of archive size. Also it can be set in Protect archive command. Larger recovery record allows to restore a larger damaged area, but increases the archive size more and is processed slower. Usually 3 - 10% of archive size is a reasonable choice. Due to service data overhead the actual resulting recovery record size only approximately matches the user defined percent and difference is larger for smaller archives.

To repair a corrupt archive, which includes the recovery record, in WinRAR shell mode apply "Repair" command to it. In the command line use command "r". Repaired archive will have fixed.arcname.rar name, where 'arcname' is the original (damaged) archive name. If corrupt archive does not contain the recovery record or if archive is not completely recovered due to major damage, the second stage is performed. During this stage only the archive structure is reconstructed and it is impossible to recover files, which fail checksum validation, but it is still possible to recover undamaged files, which were inaccessible due to corrupt archive structure. This is useful mostly for non-solid archives. This stage is not performed for archives with encrypted file names, which can be repaired only if recovery record is present.

When the second stage is completed, the reconstructed archive will be saved as rebuilt.arcname.rar, where 'arcname' is the original archive name.

RAR 5.0 recovery record is more resistant to damage of recovery record itself and can utilize a partially corrupt recovery record data. Note, though, that "Repair" command does not fix broken blocks in recovery record. Only file data are corrected. After successful archive repair, you may need to create a new recovery record for saved files.

Both 4.x and 5.0 records are most efficient if data positions in damaged archive are not shifted. If you copy an archive from damaged media using some special software and if you have a choice to fill damaged areas with zeroes or to cut out them from copied file, filling with zeroes or any other value is preferable, because it allows to preserve original data positions. Still, even though it is not an optimal mode, both versions of record attempt to repair data even in case of deletions or insertions of reasonable size, when data positions were shifted. RAR 5.0 recovery record handles deletions and insertions more efficiently than RAR 4.x.


Recovery volumes

Recovery volumes or .rev files are special files which can be created by WinRAR and allow to reconstruct missing and damaged files in a volume set. They can be used only with multivolume archives.

This feature may be useful for backups or, for example, when you posted a multivolume archive to a newsgroup and a part of subscribers did not receive some of the files. Reposting recovery volumes instead of usual volumes may reduce the total number of files to repost.

Each recovery volume is able to reconstruct one missing RAR volume. For example, if you have 30 volumes and 3 recovery volumes, you are able to reconstruct any 3 missing volumes. If the number of .rev files is less than the number of missing volumes, reconstructing is impossible. Total number of usual and recovery volumes must not exceed 255 for RAR 4.x and 65535 for RAR 5.0 archive format. Number of recovery volumes must be less than the number of RAR volumes.

Original RAR volumes must not be modified after creating recovery volumes. Recovery algorithm uses data stored both in REV files and in RAR volumes to rebuild missing RAR volumes. So if you modify RAR volumes, for example, lock them, after creating REV files, recovery process will fail.

Additionally to recovery data, RAR 5.0 recovery volumes also store service information such as checksums of protected RAR files. So they are slightly larger than RAR volumes which they protect. If you plan to copy individual RAR and REV files to some removable media, you need to take it into account and specify RAR volume size by a few kilobytes smaller than media size.

WinRAR reconstructs missing and damaged volumes either when clicking on .rev file, or when using rc command or automatically, if it cannot locate the next volume and finds the required number of .rev files when unpacking.

You may use "Recovery volumes" option of Archive name and parameters dialog or the similar option in Protect archive command to create recovery volumes. In the command line mode you may do it with -rv switch or rv command.

Original copies of damaged volumes are renamed to *.bad before reconstruction. For example, volname.part03.rar will be renamed to volname.part03.rar.bad.


Self-extracting (SFX) archives

An SFX (SelF-eXtracting) archive is an archive, merged with an executable module, which is used to extract files from the archive when executed. Thus no external program is necessary to extract the contents of an SFX archive, it is enough to execute it. Nevertheless WinRAR can work with SFX archives as with any other archives, so if you do not want to run a received SFX archive (for example, because of possible viruses), you may use WinRAR to view or extract its contents.

SFX archives usually have .exe extension as any other executable file.

SFX archives are convenient if you want to give an archive to somebody, but do not know, if they have an appropriate archiver to extract files from it. You may also use SFX archives to distribute your own software. For example, WinRAR package is based on GUI RAR SFX module Default.sfx.

To create an SFX archive from the command line you may use the -sfx switch to make a new archive or S command to convert an existing archive to SFX. In WinRAR shell either select "Create SFX archive" option in Archive name and parameters dialog, when creating a new archive or enter into an already existing archive and press "SFX" button.

WinRAR distributive includes several SFX modules. All SFX modules have .sfx extension and must be in the same folder as WinRAR. By default WinRAR always uses Default.sfx module, but you may specify the name of another module directly in "-sfx" switch or "S" command. For example, to convert myarchive.rar to SFX using WinCon.SFX module run:

WinRAR SWinCon.SFX myarchive.rar

In the WinRAR shell you can select the desired SFX module from the list displayed when executing Convert archive to SFX command.

Here you can read about the following SFX modules:

  • GUI RAR and ZIP SFX modules (Default.SFX and Zip.SFX)
  • Console RAR SFX module (WinCon.SFX)


Solid archives

Solid archive is an archive packed with a special compression method, which treats several or all files within the archive as one continuous data stream. WinRAR supports solid mode only in RAR archiving format, ZIP archives are always non-solid. Use Create solid archive option in archiving dialog or -s command line switch to enable solid archiving.

Solid archiving significantly increases compression when adding a large number of small, similar files. But it also has a few important disadvantages:

  • slower updating of existing solid archives;
  • to extract a single file from a solid archive all preceding files must be analyzed. This makes extraction from the middle of a solid archive slower than extraction from a normal archive, but, if all files are to be extracted from a solid archive, the extraction speed will not be affected.
  • if any file in a solid archive is damaged, it will be impossible to extract all files which follow the damaged area. Thus if a solid archive is stored to a potentially unreliable media, it is recommended to make use of the recovery record.

Solid archiving is preferable if:

  • the archive is updated rarely;
  • it is not necessary to frequently extract a single file or only part of the files from the archive;
  • compression ratio is more important than compression speed.

Usually files in a solid archive are sorted by extension. But it is possible to disable sorting with -ds switch or set an alternative file order using a special file, rarfiles.lst.

Volumes and self-extracting archives (SFX) may also be solid.

See also: switch -s, switch -ds, rarfiles.lst


Volumes (split archives)

WinRAR can create an archive consisting of several files. Such archive is called multivolume and individual files composing this archive are known as volumes. Generally volumes are used to store large data amounts on removable disks or transfer data by email.

WinRAR can create RAR and ZIP volumes. Another name, widely used for ZIP volumes, is ZIP split files.

By default RAR volumes have names like 'volname.partNNN.rar', where NNN is the volume number. For RAR 4.x archive format using -vn switch it is possible to select another, extension based naming scheme, where the first volume file in a multi-volume set has the extension .rar, following volumes are numbered from .r00 to .r99. RAR 5.0 archives do not support -vn and extension based names.

RAR volumes can also be solid and self-extracting. First self-extracting volume has a different (i.e. not .rar) file extension, for example, .exe for Windows SFX volumes.

To unpack RAR volumes you need to start extraction from the first volume. If volumes are stored on non-removable media like a hard disk, you need to put all volumes in the same folder before starting extraction.

ZIP volumes have names like 'volname.zip', 'volname.z01', 'volname.z02'. Use a volume with ".zip" file extension in all archive processing operations like starting extraction or opening an archive.

Unlike RAR volumes, ZIP volumes cannot be self-extracting. WinRAR needs to have access to all ZIP volumes of multivolume file set at the same time, when creating or unpacking them. So it is impossible to create or unpack ZIP volumes on removable disks, one volume per disk. You need to create them all in the same folder and then you may copy them manually to removable disks if you need it. Similarly, you need to collect all ZIP volumes in the same folder before starting extraction.

It is impossible to add, update or delete files in already existing volumes. You can create only a new volume set.

Starting from version 3.40, WinRAR stores the volume number inside of RAR volumes. You can see this number at the top of "Show information" dialog if you apply Show information command to volume. This number may be useful if original volume names are lost and you need to restore correct names manually.


Command A - add to an archive

Add specified files and folders to an archive. This is a command line equivalent of the command Add.

Note: because archive volume modification is disabled, this command cannot be used to update an archive volume, only to create one.

Examples

  1. add all *.hlp files from the current folder to the archive help.rar

WinRAR a help *.hlp

  2. archive all files from the current folder and subfolders to 362000 bytes size solid, self-extracting volumes save.part1.exe, save.part2.rar, save.part3.rar, …, and add the recovery record to each volume

WinRAR a -r -v362 -s -sfx -rr save

because no file names are specified, all files (*) are assumed.

  3. as a special exception, if folder name is specified as an argument and if folder name does not include file masks and trailing backslash, the entire contents of the folder and all sub-folders will be added to the archive even if switch -r is not specified.

The following command will add all files from the folder Bitmaps and its subfolders to the RAR archive Pictures.rar:

WinRAR a Pictures.rar Bitmaps

  4. if folder name includes file masks or trailing backslash, normal rules apply and you need to specify switch -r to process its subfolders.

The following command will add all files from the folder Bitmaps, but not from its subfolders, because switch -r is not specified:

WinRAR a Pictures.rar Bitmaps\*


Command C - add an archive comment

This command allows to add a comment to an archive. Maximum comment length is 256 KB for RAR archives and 32768 bytes for ZIP archives. It is also possible to add an archive comment through archive management command Add archive comment.

Because archive volume modification is disabled, this command is not applicable to volumes. You may use switch -z<file> to add a comment to a volume when creating it.

Examples

  1. add comment to the archive distrib.rar

WinRAR c distrib.rar

  2. Comments may be added from a file by using the -z<file> switch.

WinRAR c -zinfo.txt dummy


Command CH - change archive parameters

This command can be used with most of archive modification switches to modify archive parameters. It is especially convenient for switches like -cl, -cu, -tl, which do not have a dedicated command.

It is not able to recompress, encrypt or decrypt archive data and it cannot merge or create volumes. If used without any switches, 'ch' command just copies the archive data without modification.

Example

set archive time to latest file

WinRAR ch -tl files.rar


Command CV - convert archives

This command provides the command line interface to WinRAR Convert archives. You can combine it with -y switch to skip "Convert archives" dialog and start the operation with default parameters. Use "Save" button in "Convert archives" dialog to change default parameters.

Example

convert all ZIP archives in the c:\files folder using default conversion parameters

WinRAR cv -y c:\files\*.zip


Command CW - write an archive comment to file

This command allows to save an archive comment to file. Format of output file depends on -sc switch.

Examples

  1. store the comment of archive arc to ASCII file comment.txt

WinRAR cw arc comment.txt

  2. store the comment of archive arc to Unicode file unicode.txt

WinRAR cw -scuc arc unicode.txt


Command D - delete files from archive

Delete specified files and folders from an archive. This is the command line equivalent of the archive management command Delete.

Notes

  1. If this command removes all files from archive, the empty archive is removed.
  2. This command is not applicable to volumes, because volumes cannot be modified.

Example

delete all *.dmy files from archive dummy.rar

WinRAR d dummy.rar *.dmy


Command E - extract from archive ignoring paths

Command E - extract from an archive ignoring paths

Extract archived files, ignoring paths, to the current or a specified folder. This is the command line equivalent of the archive management command Extract to a specified folder with the option "Do not extract paths" enabled in the Extraction path and options dialog.

Example

extract to the current folder all *.doc files from all RAR archives in the current folder

WinRAR e *.rar *.doc


Command F - freshen files within an archive

Update files in the archive only if they are older than files to add. This command will not add new files to the archive. This is the command line equivalent of the command Add to archive with "Fresh existing files only" update mode selected in the Archive name and parameters dialog.

Because archive volume modification is disabled, this command is not applicable to volumes.

See also: command A - add files to archive


Command I - search string in archives

Command I[i|c|h|t]=<string> - search string in archives

Find string in archives. Supports following optional parameters:

i case insensitive search (default);

c case sensitive search;

h hexadecimal search;

t use ANSI, UTF-8, UTF-16 and OEM character tables;

If no parameters are specified, it is possible to use the simplified command syntax i<string> instead of i=<string>

It is allowed to specify 't' modifier with other parameters, for example, ict=string performs case sensitive search using all mentioned above character tables.

Examples

  1. Perform case sensitive search of "first level" string in *.txt files in *.rar archives on the disk c:

WinRAR "ic=first level" -r c:\*.rar *.txt

  2. Search for hex string f0 e0 ae ae ab 2d 83 e3 a9 in rar archives in e:\texts folder.

WinRAR ih=f0e0aeaeab2d83e3a9 -r e:\texts\*.rar


Command K - lock an archive

WinRAR cannot modify locked archives, so locking important archives prevents their accidental modification by WinRAR. Such protection might be especially useful in case of WinRAR commands processing archives in groups.

This command is not intended or able to prevent modification by other tools or willful third party. It implements a safety measure only for accidental data change by WinRAR.

This is the command line equivalent of the archive management command Lock archive. It is supported for RAR archive format only.

Example

WinRAR k release


Command M - move files and folders to an archive

Similar to command a, but files and folders are erased upon successful completion of the packing operation. This is the command line equivalent of the command Add to archive with the option "Delete files after archiving", enabled in the Archive name and parameters dialog.

Because archive volume modification is disabled, this command cannot be used to update an archive volume, only to create one.


Command R - repair a damaged archive

Archive repairing consists of two stages. First, the damaged archive is scanned for recovery record (see the rr command). If archive contains the previously added recovery record and if damaged data area is continuous and smaller than error correction code size in recovery record, chance of successful archive reconstruction is high. When this stage has been completed, a new archive is created, named as fixed.arcname.rar, where 'arcname' is the original (damaged) archive name.

If damaged archive does not contain the recovery record or if archive cannot be completely recovered due to severe damage, second stage is performed. During this stage only the archive structure is reconstructed and it is impossible to recover files which fail checksum validation, but it is still possible to recover undamaged files which were inaccessible due to a corrupt archive structure. Generally this is useful for non-solid archives. In a damaged solid archive, often, only the first file may be recovered during the second stage. This stage is not performed for archives with encrypted file names, which can be repaired only if recovery record is present.

When this stage has been completed, a new archive will be created, named as rebuilt.arcname.rar, where 'arcname' is the original archive name.

By default, repaired archives are created in the current folder, but you can append an optional destpath\ parameter to specify another destination folder.

This command is the command line equivalent of the file management command Repair archive.

Example

repair buggy.rar and place the result to 'c:\fixed' folder

WinRAR r buggy.rar c:\fixed\


Command RC - reconstruct missing volume

Reconstruct missing volumes using recovery volumes (.rev files). You need to specify any existing volume as the archive name, for example:

WinRAR rc backup.part03.rar

You may read more about recovery volumes here.


Command RN - rename archived files

Rename files inside of archive. This command is supported for RAR and ZIP formats. The command syntax is:

winrar rn <arcname> <srcname1> <destname1> … <srcnameN> <destnameN>

For example, the following command:

WinRAR rn data.rar readme.txt readme.bak info.txt info.bak

will rename readme.txt to readme.bak and info.txt to info.bak in the archive data.rar.

It is allowed to use wildcards in the source and destination names for simple name transformations like changing file extensions. For example:

WinRAR rn data.rar *.txt *.bak

will rename all *.txt files to *.bak.

WinRAR does not check if the destination file name is already present in the archive, so you need to be careful to avoid duplicated names. It is especially important when using wildcards. Such command is potentially dangerous, because a wrong wildcard may corrupt all archived names.


Command RR[N] - add data recovery record

Optionally, redundant information (recovery record) may be added to RAR archive. While it increases the archive size, it helps to recover archived files in case of disk failure or data loss of other kind, provided that damage is not too severe. Such damage recovery can be done with command "r". ZIP archive format does not support the recovery record.

RAR 4.x and RAR 5.0 archives use different recovery record structure and algorithms.

RAR 4.x recovery record is based on XOR algorithm. You can specify 4.x record size as a number of recovery sectors or as a percent of archive size. To specify a number of sectors just add it directly after 'rr', like 'rr1000' for 1000 sectors. To use a percent append 'p' or '%' modifier after the percent number, such as 'rr5p' or 'rr5%' for 5%. Note that in Windows .bat and .cmd files it is necessary to use 'rr5%%' instead of 'rr5%', because the command processor treats the single '%' as the start of a batch file parameter, so it might be more convenient to use 'p' instead of '%' in this case.

RAR 4.x recovery sectors are 512 bytes long. If damaged area is continuous, every sector helps to recover 512 bytes of damaged information. This value may be lower in cases of multiple damage. Maximum number of recovery sectors is 524288.

Size of 4.x recovery record may be approximately determined as <archive size>/256 + <number of recovery sectors>*512 bytes.

RAR 5.0 recovery record uses Reed-Solomon error correction codes. Its ability to repair continuous damage is about the same as for RAR 4.x, allowing to restore slightly less data than recovery record size. But it is significantly more efficient than RAR 4.x record in case of multiple damaged areas.

RAR 5.0 record does not use 512 byte sectors and you can specify its size only as a percent of archive size. Even if '%' or 'p' modifier is not present, RAR treats the value as a percent in case of RAR 5.0 format, so both 'rr5' and 'rr5p' mean 5%. Due to service data overhead the actual resulting recovery record size only approximately matches the user defined percent and difference is larger for smaller archives.

RAR 5.0 recovery record size cannot exceed the protecting archive size, so you cannot use more than 100% as a parameter. Larger recovery records are processed slower both when creating and repairing.

Both 4.x and 5.0 records are most efficient if data positions in damaged archive are not shifted. If you copy an archive from damaged media using some special software and if you have a choice to fill damaged areas with zeroes or to cut out them from copied file, filling with zeroes or any other value is preferable, because it allows to preserve original data positions. Still, even though it is not an optimal mode, both versions of record attempt to repair data even in case of deletions or insertions of reasonable size, when data positions were shifted. RAR 5.0 recovery record handles deletions and insertions more efficiently than RAR 4.x.

If you use the plain 'rr' command without optional parameter, WinRAR will set the recovery record size to 3% of archive size by default.

This command is the command line equivalent of archive management command Protect archive from damage.

Examples

  1. add a data recovery record of the default size (3%) to the archive backup

WinRAR rr backup

  2. add a data recovery record to the archive pictures and set its size to 5% of the total archive size

WinRAR rr5p pictures


Command RV[N] - create recovery volumes

Create recovery volumes (.rev files), which can be later used to reconstruct missing files in a volume set.

This command makes sense only for RAR multivolume archives and you need to specify the name of the first volume in the set as the archive name. For example:

WinRAR rv3 data.part01.rar

The optional <N> parameter specifies a number of recovery volumes to create and must be less than the total number of RAR volumes in the set. You may also append a percent or 'p' character to this parameter, in such case the number of creating .rev files will be equal to this percent taken from the total number of RAR volumes. For example:

WinRAR rv15% data.part01.rar

You may read more about recovery volumes here.


Command S[name] - convert an archive to a Self-Extracting type

Command S[name] - convert an archive to a self-extracting

This command creates a self-extracting archive (SFX) which, when executed, extracts the files contained within it.

It is also possible to make an SFX archive as the first of a multi-volume sequence, but it should be noted that the size will be larger by the amount of the SFX module. Should SFX volumes be created using the command a with the switches: -v[<size>] -sfx, then you do not need to ensure the volume size - the first volume will be automatically created with the correct size.

This command is the command line equivalent of the archive management command Convert archive to SFX.

Example

WinRAR s diamant

By default, WinRAR uses for RAR archives SFX module file default.sfx, which must exist in the same folder as winrar.exe and, for ZIP archives, zip.sfx module. It is possible to specify, in the "s" command, an alternate SFX module name.

For example, to add the console SFX module WinCon.sfx execute:

WinRAR sWinCon.sfx myinst


Command S- - remove SFX module

This command removes a self-extracting module from the already existing self-extracting archive (SFX).

WinRAR creates a new archive without SFX module, the original SFX archive is not deleted.

Example

WinRAR s- rarsetup.exe


Command T - test archive files

Command T - test archived files

This command performs a dummy file extraction, writing nothing to the output stream, in order to validate the specified file(s). This is the command line equivalent of the archive management command Test files.

Example

test all *.rar archives on the current disk

WinRAR t -r \*.rar


Command U - update files within an archive

This command, as well as command f, updates files in the archive only if they are older than files being added, but unlike "f", it will add new files as well.

This is the command line equivalent of the command Add to archive with "Add and update files" update mode selected in the Archive name and parameters dialog.

Because archive volume modification is disabled, this command is not applicable to volumes.

See also: command A - add files to archive


Command X - extract files from an archive with full paths

Extract files and folder with full paths. The folder structure, saved in the archive, is completely restored. This is the command line equivalent of the archive management command Extract.

In a similar manner as command e this command can extract files both to the current folder and to a specified folder.

For example, command:

WinRAR x Fonts *.ttf

will extract *.ttf files from the archive Fonts to the current folder, but the command:

WinRAR x Fonts *.ttf NewFonts\

will extract *.ttf files from the archive Fonts to the folder NewFonts

You need to use the trailing backslash as in the example above for denoting the destination folder.


Common command line syntax

Command line syntax

It is possible to perform WinRAR commands from the command line. Common command line syntax is described below:

WinRAR <command> -<switch1> -<switchN> <archive> <files...> <@listfiles...> <path_to_extract\>

Command | Character combination specifying the function to be performed by WinRAR. See the list of WinRAR commands here.
Switch | Switches are used to define a specific type of operation, compression strength, type of archive, etc. See the list of WinRAR switches here.
Archive | The name of the archive to process.
Files | The name(s) of files to be processed.
Listfiles | Listfiles are plain text files that contain names of files to process. File names should start at the first column. It is possible to put comments to the listfile after // characters. For example, you may create backup.lst containing the following strings: c:\work\doc\*.txt//backup text documents c:\work\image\*.bmp//backup pictures c:\work\misc and then run: winrar a backup @backup.lst You may specify both usual file names and list files in the same command line.
Path_to_extract | Used only with commands e and x, indicating the folder in which to place extracted files. If this folder does not exist, it will be created.

Notes

a) If neither files nor listfiles are specified, then *.* is implied and WinRAR will process all files;

b) If archive extension is not specified when creating an archive, WinRAR will use the default archive format selected in the default compression profile, but you may override it by specifying either .rar or .zip extension.

If no archive extension is specified when extracting, WinRAR assumes .rar, so * means all archives with .rar extension. If you need to process all archives without extension, use *. mask. *.* mask selects all files. You can use wildcards in archive name in most operations, such as extraction, test and many others, but wildcards are not allowed when archiving and deleting.

c) Switches entered on the command line override the same configuration settings;

d) For commands c, e, s, t, rr, k and x wildcards may be used in the archive name. Thus it is possible to process more than one archive with a single command. Moreover, if you specify -r switch with these commands, they will search for archives in subfolders;

e) Some commands and switches are applicable only to RAR archives, some both to RAR and ZIP and some to all archive formats. This is dependent upon the functionality provided by the archive format;

f) Commands and switches are not case sensitive, you may write them both in upper and in lower case;

g) If any component of command line contains spaces, enclose it to quotes.

Examples

  1. add the folder "c:\latest data" to archive Info.rar

WinRAR a Info.rar "c:\latest data"

  2. unpack the archive Info.rar to folder d:\data

WinRAR x Info.rar d:\data\


Alphabetic commands list

a | add files to an archive
c | add an archive comment
ch | change archive parameters
cv | convert archives
cw | write an archive comment to file
d | delete files from archive
e | extract files from an archive, ignoring paths
f | freshen files within an archive
i | find string in archives
k | lock an archive
m | move files and folders to an archive
r | repair a damaged archive
rc | reconstruct missing volumes
rn | rename archived files
rr[N] | add data recovery record
rv[N] | create recovery volumes
s[name] | convert an archive to a self-extracting type
s- | remove SFX module
t | test archive files
u | update files within an archive
x | extract files from an archive with full paths


"Add to archive" command

This command is accessible both in file management and in archive management modes.

When WinRAR browses files on a disk, first, you need to select the files and folders, which are to be archived. Then run "Add to archive" command using either Commands menu, button "Add" on the toolbar or Alt+A keyboard shortcut. Select archive name and parameters in the Archive name and parameters dialog and press Enter to start archiving.

When WinRAR shows archive contents, you need first to run "Add to archive" command, then select files in the appeared dialog and set archive name and parameters as described above.

Command line equivalent: command "a"


"Benchmark" command

Using "Benchmark" command you may compare performance of RAR compression algorithm on different computers.

This command generates random data, which contain specially introduced redundancy increasing load to processor and memory. Then data are passed through RAR compression and decompression algorithms and output of decompression algorithm is compared with source data. If any difference found, WinRAR reports "Errors found - Yes" in the command window. Such errors may indicate hardware problems like unreliable memory. Also WinRAR displays a size of processed data and compression speed, current and resulting, in kilobytes per second. You may use the resulting speed value to compare RAR performance in different conditions. For example, "Benchmark" command may be helpful, when you need to choose a new computer and wish to know which one will compress data faster. Only the general compression algorithm in "Best" mode with 4096K dictionary is called, all additional filters and algorithms are disabled, so it measures performance of core RAR compression on worst case like data.

Using "Multithreading" option you can compare performance of usual single threaded and multithreaded (optimized for multiprocessor architectures) versions of RAR compression algorithm. Depending on results, you can enable or disable multithreading in General settings dialog dialog.

It takes some time to fill the compression dictionary, which is empty in the beginning. Until it is done, the speed value is inconsistent, so the command window starts to display the current speed only a few seconds after activating. Resulting speed is displayed when collected statistics is enough to get an accurate result. After the resulting speed has been set, it is not changed more. Though source data are random, their redundancy level and other parameters are always the same. So this command will report practically the same current speed regardless of execution time, provided that system load is not changing.

It is not guaranteed that different WinRAR versions will report same compression speed values, so if you use this command to compare performance of different computers, ensure that you run the same WinRAR version in all tests. Also it is recommended to close other applications before starting a benchmark.

"Benchmark" command is never finished automatically, you need to cancel it manually. It does not use the hard disk, all operations are performed in memory.


"Add archive comment" command

This command is accessible both in file management and in archive management modes. If you are inside of archive, there is no need to select any files, just run "Add archive comment" command using either Commands menu, "Comment" button on the toolbar or Alt+M keyboard shortcut and enter the archive comment in the appeared dialog. If you browse uncompressed files in the file management mode, first select files and folders which will be searched for archives to comment.

Command line equivalents: command "c", switch -z<file>


"Convert archives" command

This command allows to recompress archives from one format to another. It is accessible both in file management and in archive management modes. In the file management mode you may select several files and folders to process, WinRAR will scan them and convert found archives. In the archive management mode only the current archive is converted by default. "Convert archives" dialog contains several items controlling command execution. They are described below.

Archives to convert

List of archives, which will be converted by WinRAR. You may add or remove items of this list using "Add" and "Remove" buttons. "Remove" button does not delete files on the disk, it just removes them from the list to convert.

Contents of archive list depends on the next dialog parameter, list of formats.

Archive types

Here you may choose which archive formats you are going to convert. Archive formats in this list may be followed by the number enclosed in parentheses. It shows how many archives of this type are found and ready to be converted. For example, "zip(12)" means that WinRAR found 12 zip archives. If this number is missing, no archives of this type were found.

Conversion options/Lowest allowed ratio

This option allows to specify the lowest <new packed size>/<old packed size> percent acceptable for converted archives. For example, if you set it to 100, WinRAR will preserve already existing archives, when a new archive is larger than old one. If it is disabled, WinRAR ignores archive sizes.

Conversion options/Compression

"Compression" button activates a dialog, where you may choose different parameters for converted archives. For example, you may select either they will be rar or zip.

Conversion options/Folder for converted archives

Here you may enter a folder to place converted archives. If this field is empty, new archives will be placed in the same folder as old converted files.

Conversion options/Delete original archives

Chooses either to delete successfully converted archives.

If original and new archives have the same format and "Folder for converted archives" field is blank, original archives will be deleted regardless of this option.

Conversion options/Skip encrypted archives

If this option is enabled, archives with encrypted data will not be processed. It might be useful if you wish to run the conversion command in unattended mode, avoiding password prompts. Though, if you know that all encrypted archives use the same password, another approach can be to have this option off and set the default password in File menu before invoking the convert command.

"Save" button

This button stores the state of all dialog controls except "Archives to convert" list, so it will be restored when activating the dialog next time. You may use it to save your favorite conversion settings.

Remarks

  1. WinRAR keeps the new archive only if it was successfully created, tested and reported the total unpacked size of contained files equal to unpacked size of original archive.
  2. WinRAR attempts to preserve archive comments when possible. But if user specified a comment in the dialog activated by "Compression" button, it will have a higher precedence. File comments are not converted. Other special archive information like NTFS streams and file security data may be either converted or not depending on compression settings and archive format.
  3. WinRAR unpacks original archives to temporary folder before converting. You need to have enough free space in this folder.
  4. WinRAR may fail to convert archives containing special data like links or file versions.


"Delete files" command

This command is accessible both in file management and in archive management modes. In file management mode it deletes the selected files and folders to the Recycle Bin, so you have the chance to restore accidentally deleted data. But in archive management mode the selected files and folders are deleted from the archive completely, without any possibility of restoring them later, so you need to be careful here. To run this command use either Commands menu , button "Delete" on the toolbar, Alt+D or Del keyboard shortcuts.

In file management mode you can also delete files permanently. Press Shift+Del instead of Del to avoid moving files to the Recycle Bin. Shift+Del command silenly deletes even files with read-only and system attributes and permits to delete files with non-standard names, such as with trailing spaces and dots. Usual Recycle Bin based delete can fail to process such names.

Command line equivalent: command "d"


"Extract without confirmation" command

This command is accessible both in file management and in archive management modes. If WinRAR is inside of archive, you need to select archived files and folders, which are to be extracted. If you browse uncompressed files in the file management mode, select files and folders which will be searched for archives to unpack. Then run "Extract without confirmation" command using either Commands menu, "Extract" button on the toolbar or Alt+W keyboard shortcut. The selected files will be extracted to the current folder or to the default folder for extracted files, if it is specified in Paths settings dialog. If you need to set a different destination folder or some additional options, use Extract to the specified folder command instead.

Command line equivalent: command "x"


"Extract files to a specified folder" command

This command is accessible both in file management and in archive management modes.

In the archive management mode, when WinRAR shows archive contents, first, you need to select archived files and folders, which are to be extracted. Then run "Extract files to a specified folder" command using either Commands menu, "Extract to" button on the toolbar or Alt+E keyboard shortcut. In the Extraction path and options dialog you may specify the destination folder for extracted files and, if necessary, set additional options. After closing this dialog, extraction is started.

In the file management mode it is possible to unpack several archives at once. In general the operation is similar to the described in the previous paragraph, but instead of selecting files inside of archive you need to select archives and folders, where WinRAR should search for archives. If any archives are found, the Extraction path and options dialog will be displayed. After closing this dialog contents of all found archives will be extracted.

Command line equivalent: command "x"


"Find files" command

This command is accessible both in file management and in archive management modes. Using "Find files" dialog it is possible to search for files contained the specified string either in the opened archive or in selected folders or disks. Dialog items are described below.

File name to find

By default it contains "*", what means to check all files. You may enter other file mask here, for example, "*.txt" to search only in .txt files. It is allowed to enter several file masks separated by spaces. If you need to specify a file name containing spaces, enclose it in quotes.

String to find

Here you may enter a string to find. If you leave this field blank, WinRAR will display all files matching other specified criteria.

Match case

Enables case sensitive string comparison.

Use all tables

Use ANSI, Unicode UTF-8, Unicode UTF-16 and OEM (MS DOS) character tables when searching for string. If this option is off, WinRAR uses only the default Windows character table (ANSI) in the search operation.

Hexadecimal search

Treat the entered string as sequence of hexadecimal values separated by spaces.

Search area

This option is restricted to currently opened archive if searching inside of archive. Outside of archive use "Current folder" to search in the current folder only, "Selected items" to search in folders and files selected in WinRAR file list. Select appropriate drive names to search on these drives.

Archive types

Archive types to search in. By default it contains "*", what means "all archive formats", but, for example, you may enter "*.rar" to search data only in rar archives. It is allowed to enter several archive masks separated by spaces.

"Find in subfolders" option

Forces WinRAR to search not only in the specified folder, but also in its subfolders. Valid for "Current folder" search area only.

"Find in files" option

If enabled, WinRAR will search in usual not archived files matching the specified file name.

"Find in archives" option

Enables to search in the archived files. You may set both "Find in files" and "Find in archives" to search a desired string both in archives and in usual files.

"Skip encrypted" option

If password is required to search inside of encrypted archive, such archive is skipped silently.

"Save" button

This button saves a part of options in this dialog, so they will be automatically restored when activated next time. Some options might be not saved and instead initialized to values more suitable for current search.

Command line equivalent: command "i"


"Show archive information" command

"Show information" command

This command is accessible both when WinRAR is in the file management and in the archive management modes. Just run "Show information" command using either Tools menu, "Info" button on the toolbar or Alt+I keyboard shortcut.

In the file management mode it allows to get the information about contents of selected files and folders: the total size, a number of files and subfolders, a number of archives. To improve the operation speed archives are detected basing only on the file name extension, so self-extracting archives are not counted here. File scanning may take a long enough time, but if you wish you may close the dialog in any moment.

Disk space is allocated to files in fixed size blocks called clusters. For example, if a cluster size is 4096 bytes and you created a file only 1 byte size, in fact it will occupy 4096 bytes. So, to give you a hint, how much space your files are really take and how much you may save after archiving them, the information dialog also displays a cluster size for the current disk, a real size of selected files including not filled tails of clusters and so called "Files slack" - the total space wasted in these cluster tails.

When the file scanning is complete, you may press "Estimate" button to get a prognosis about compression size and time for selected files. This prognosis is based on RAR "Best" compression method supposing that disk is fast and time spent to disk data exchange is small. Compression estimation is performed very quickly and very roughly, so do not expect an exact result here. Though it can show if it is worth spending time to compress selected data. If you set "Start automatically" option, the estimate operation will be initiated automatically, when opening the dialog next time, without necessity to use "Estimate" button.

Also, after completing the scan operation, it is possible to switch to other pages of this dialog and specify different archive options like a comment, recovery record, SFX module, etc. It allows to apply necessary changes to all RAR and ZIP archives contained in the selected folders and files. Unlike the scan step, self-extracting archives are also processed here. Be cautious with this operation, it may change parameters of hundreds and thousands archives at once. Such feature is powerful, but may become rather dangerous when improperly used.

In the archive management mode, when you activate "Show information" either inside of archive or outside of it, but when only one archive is selected, WinRAR will display the following information about the archive:

  • archive name (in the dialog title);
  • archive type (solid, SFX, volume) and format (RAR, ZIP, CAB, ARJ, LZH, etc.). All these parameters are combined in the single string displayed at the top of the dialog.

For RAR volumes created by WinRAR 3.40 or higher this string also includes a volume number. This number may be useful if original volume names are lost and you need to restore correct names manually;

  • minimum archiver version required for extraction. For some archive formats, such as ZIPX, this field may also include a name of compression algorithm;
  • operating system under which the archive was created;
  • the total number of files;
  • the total unpacked and packed files length;
  • the total compression ratio;
  • size of self-extracting module or zero for non-SFX archives;
  • presence of the archive comment ;
  • presence of encrypted files;
  • if archive is locked;
  • size of maximum continuous damaged area, which still can be repaired in the best case using the recovery record, if it is present in the archive;
  • maximum dictionary size used for any file within the archive.

If the archive has an archive comment, an additional dialog sheet containing this comment is displayed.

Like in the file management mode, it is possible to switch to other pages of the dialog and specify different parameters for the current archive. Just press "Help" button in other pages to read more about them.


"Lock archive" command

This command is accessible both in file management and in archive management modes. If you are inside of archive, there is no need to select any files, just run "Lock archive" command using either Commands menu, "Lock" button on the toolbar or Alt+L keyboard shortcut. If you browse uncompressed files in the file management mode, first select files and folders which will be searched for archives to lock.

WinRAR cannot modify locked archives, so locking important archives prevents their accidental modification by WinRAR. Such protection might be especially useful in case of WinRAR commands processing archives in groups.

This command is not intended or able to prevent modification by other tools or willful third party. It implements a safety measure only for accidental data change by WinRAR. It is supported only by RAR archives.

Command line equivalent: command "k"


Commands menu

Function | Shortcut
Add files to archive | Alt+A
Extract to a specified folder | Alt+E
Test archived files | Alt+T
View file | Alt+V
Delete files | Del, Shift+Del
Rename file | F2
Print file | Ctrl+I
Extract without confirmation | Alt+W
Add archive comment | Alt+M
Protect archive from damage | Alt+P
Lock archive | Alt+L


"Print file" command

This command allows to print a file under the cursor and is accessible both in file management and in archive management modes. To run this command use either Commands menu or Ctrl+I keyboard shortcut.


"Protect archive from damage" command

This command is accessible both in file management and in archive management modes. If you are inside of archive, there is no need to select any files, just run "Protect archive from damage" command using either Commands menu, "Protect" button on the toolbar or Alt+P keyboard shortcut. If you browse uncompressed files in the file management mode, first select files and folders which will be searched for archives to protect.

This command adds a recovery record to the currently opened or selected archives. It may help to repair it later in case of small physical damage of the archive data. This feature is supported only by RAR archives.

If an opened archive is the first file in the multivolume sequence, you may also create recovery volumes for it. Just enter a number of .rev files to create. You may also append a percent character to this parameter, in such case the number of creating .rev files will be equal to this percent taken from the total number of RAR volumes.

Command line equivalent: command "rr", command "rv"


"Rename file" command

This command allows to rename a file or folder under the cursor and is accessible both in file management and in archive management modes. Renaming files inside of archives is supported for RAR and ZIP formats. To run this command use either Commands menu or F2 keyboard shortcut.

Rename command has some restrictions when working with multivolume archives. Only those files which are contained in the current volume can be renamed. If you wish to rename files in volumes, you need to disable "Merge volume contents" option in the File list settings dialog and open the volume containing required files.

Be careful when choosing a new file name. If it includes characters, which are not supported by file system, you may have problems with extracting the renamed file afterwards. In such situation just rename it again to something more usable.

Command line equivalent: command "rn"


"Repair archive" command

This command is accessible both in file management and in archive management modes. It considers selected files or opened archive as corrupt archives and attempts to repair them. To run this command use either Tools menu , "Repair" button on the toolbar or Alt+R keyboard shortcut.

WinRAR is able to repair only RAR and ZIP archives. WinRAR tries to detect the type of the archive automatically using archive data and extension, but user also may set an archive type manually.

The source archive is not changed and result of operation is stored into a new archive, which is named fixed.arcname.rar or rebuilt.arcname.rar, where 'arcname' is the original archive name.

Success of "Repair" operation depends on the archive type and type and size of damaged area. Chance of successful RAR archive repair is significantly higher if it has the recovery record. If archive does not contain the recovery record, chances are lower for solid archives and no repair is possible for archives with encrypted file names.

Technical details of archive repairing are provided in the command "r" description ("r" is the command line equivalent of "Repair archive" command).

Command line equivalent: command "r"


"Generate report" command

This command is accessible both when WinRAR is in the file management and in the archive management modes.

In the archive management mode this command creates a report containing the complete list of files in the currently opened archive. File selection is ignored.

In the file management mode a report provides information only about selected items. Depending on command parameters, report may include both usual files and contents of archives found in selected items. If you selected a folder, WinRAR will process its files and subfolders as well.

It is possible to modify report style using following parameters.

Write report to file

Here you may enter a file name to store the report. It is allowed to leave this field blank if you do not need to save the report to file.

Send report to printer

Set this option if you wish to print the report.

Copy report to clipboard

Set this option if you wish to copy the report to clipboard. It takes some amount of memory to store data in the clipboard, so be cautious with this option if you expect to produce a multi-megabyte report. It may take too much memory and decrease the operation speed.

Output format (HTML, Unicode text, text)

Select the output format for report file. HTML and Unicode text formats support Unicode, so non-English characters in file and archive names will be displayed properly. Text format is not Unicode compatible and can damage non-English characters.

Sort files by (original order, name, size, packed size, modification time, checksum)

Here you may select the sort mode or set it to Original order to skip sorting.

Sort archives separately

If this option is enabled, contents of every archive included into report will be sorted independently of other archives and files, so all files of the same archive will be placed to the same group. Otherwise all files included into report will be sorted as a single stream ignoring archive borders. This option does not make any difference in the original order sort mode.

Include to report / Archives

This option is available only in the file management mode. If it is enabled, WinRAR analyzes all files and if archive found, its contents is included into report. If you wish to get the list of usual files on your disk and do not care about archive contents, disable this option to speed up the operation.

Include to report / Usual files

This option is available only in the file management mode. If it is enabled, WinRAR will include usual files into report. If you need a report containing only archived files, you should disable this option.

Include to report / Archive name

If enabled, report will include an archive name before every continuous group of files from this archive. You may wish to disable this option only in some special cases, for example, if you need to pass a report to external program.

Include to report / Total information

If enabled, WinRAR will place the information about the total number and size of files at the end of report. If "Usual files" option is enabled, only usual files will be added to total information, otherwise only archived files will be present here. It cannot count both usual and archived files. For files split between volumes the total information calculates only those of them, which start in the current volume. It is done to avoid calculating split files several times, when processing a group of volumes.

Include to report / File size

Include the uncompressed file size into report.

Include to report / Packed size

Include the compressed file size into report. For usual files it may be not equal to uncompressed file size only on NTFS disks and only if file has the attribute "Compressed".

Include to report / File date

Include the file modification date into report. Date format is always YYYY-MM-DD hh:mm, it does not depend on system settings.

Include to report / File checksum

Include the file checksum into report. This option is available for both archived and usual files. Checksum type for archived files depends on archive format and options, for usual files it is always CRC32. Enabling this option for usual files may slow down the operation significantly, because WinRAR will need to read file data and calculate CRC32 for every processed file. Usually archives already store previosuly calcuated checksums, so this option does not introduce any additional delays for archived files.

"Save" button

Using "Save" button you may store default values of all dialog options except a report file name. WinRAR preserves two sets of default values for this command, one for archive and another for file management mode.


"Convert archive to SFX" command

This command is accessible both in file management and in archive management modes. It converts an archive to self-extracting. If you are inside of archive, there is no need to select any files to perform this operation, just run "Convert archive to SFX" command using either Tools menu, "SFX" button on the toolbar or Alt+X keyboard shortcut and select necessary SFX module from the list. If you browse uncompressed files in the file management mode, first select files and folders which will be searched for archives to convert.

If an archive is already self-extracting, using this command you may also remove an already existing SFX module from archive. In such case WinRAR does not touch the original archive and creates a new archive with the same contents, but without self-extracting module.

If you selected Windows GUI SFX module, which is proposed by default, you may also press "Advanced SFX options…" button to set a number of SFX parameters like the default destination path, a title and window text. Read Advanced SFX options topic to get more information about them.

These topics describe SFX modules provided in the WinRAR package:

  • GUI RAR and ZIP modules (Default.SFX and Zip.SFX)
  • Console RAR module (WinCon.SFX)

Command line equivalent: command "s"


"Test archived files" command

This command is accessible both in file management and in archive management modes.

In the archive management mode, when WinRAR shows archive contents, first, you need to select archived files and folders, which are to be tested. Then run "Test archived files" command using either Commands menu, "Test" button on the toolbar or Alt+T keyboard shortcut.

All errors found during test are displayed in the "Diagnostic messages" window. If no errors detected, WinRAR will display a corresponding message.

In the file management mode it is possible to test several archives at once. In general the operation is similar to the described in the previous paragraph, but instead of selecting files inside of archive you need to select archives and folders, where WinRAR should search for archives. When a search is completed, WinRAR will test contents of all found archives.

Command line equivalent: command "t"


"View file" command

This command is accessible both in file management and in archive management modes. It opens the file under the cursor in the internal viewer. To run this command use either Commands menu , button "View" on toolbar or Alt+V keyboard shortcut.

See also: Internal viewer, Viewing files


"Scan archive for viruses" command

This command is accessible both in file management and in archive management modes. It unpacks one or several archives to temporary folder and checks contents of this folder with a third party virus scanner, which must be installed on a user's computer. In the archive management mode it processes only the currently opened archive, in the file management mode all archives found in selected files and folders will be processed.

Dialog displayed by this command contains the following fields.

Virus scanners found by WinRAR

List of antivirus software installed on a computer and identified by WinRAR. If this list contains several virus scanners, you may choose anyone which you like. If the list contains only "User defined" item, it means that WinRAR could not find any antivirus software and you need to specify a scanner name and parameters manually.

Virus scanner name

Name of virus scanner executable. You need to modify this field only if WinRAR cannot find antivirus software installed on your computer and "Virus scanners found by WinRAR" list contains only "User defined" item. In such case you need to press "Browse" button and locate a virus scanner .exe file, which will be called by WinRAR to check unpacked files.

Virus scanner parameters

Parameters passed to virus scanner. You need to modify this field either if WinRAR cannot find antivirus software installed on your computer or if it passes invalid parameters to virus scanner. For example, it may happen if command line syntax of antivirus program is changed in a new version. Usually virus scanners require only one parameter - the name of folder containing unpacked files. WinRAR denotes this folder as %f. Since its name may include spaces, it is necessary to enclose it in quotes, so most likely you need to place "%f" string to this field. Though, some scanners may require additional options, which can be found in their documentation.

If you use only one antivirus and do not need to modify its parameters every time, you may skip the virus scanner selection dialog by turning "Propose to select virus scanner" option in Security settings off.

Notes

  1. WinRAR is not able to find viruses itself, it calls antivirus software already installed on your computer. If you do not have such software, you will not be able to use this WinRAR command;
  2. WinRAR does not display any messages after completion of this command. You should read information displayed by virus scanner to check if any viruses had been found;
  3. WinRAR unpacks all selected archives to temporary folder before calling a virus scanner, so your disk must have enough free space to hold all unpacked files. WinRAR deletes these files when scanning is done;
  4. WinRAR is able to detect many popular antivirus programs automatically, so normally you do not need to edit "Virus scanner name" and "Virus scanner parameters" fields manually. Just select a scanner from the list at the top of dialog and press "OK" and use two other fields only if this method does not work;
  5. WinRAR saves parameters of virus scanner started last time and restores them, when you activate this command again.


Advanced compression parameters

Usually there is no need to change settings in this dialog and it is safer to allow WinRAR to select optimal parameters automatically. Please note that improper use of this dialog may lead to very serious performance and compression loss, so change its parameters only if you clearly understand what you do.

Most of settings below are supported only by RAR 4.x archive format. None of these settings are available for ZIP. Only delta compression and 32 bit executable compression can be enabled for RAR 5.0 archives.

This dialog contains the following options.

Text compression/(Auto/Force/Disable)

Text compression allows to improve the compression ratio for plain text data, but its compression and decompression speed also as ability to utilize several processor cores are much worse than in general compression algorithm. So the default state for this option is "Disable". You can change it to "Auto" to allow WinRAR to select this algorithm automatically for suitable data. "Force" applies the text compression algorithm to all data, but be prepared to slower archiving and extracting if using this option.

Text compression/Prediction order

Set the prediction order of PPM algorithm (the kernel of RAR text compression). Allowed values are 2 - 63. Usually a higher value slightly increases the compression ratio of redundant data, but only if enough memory is available to PPM. In case of lack of memory the result may be negative. Higher order values decrease both compression and decompression speed. If this field is set to 0, WinRAR will choose the order automatically.

Text compression/Memory to use, MB

Memory in megabytes allocated for PPM (can be 1-128). Higher values may increase the compression ratio, but note that PPM uses an equal memory size both to compress and decompress, so if you allocate too much memory when creating an archive, other people may have problems when unpacking it on a computer with less memory installed. If this field is set to 0, WinRAR will choose the memory size automatically.

Audio compression/(Auto/Force/Disable)

In "Auto" mode WinRAR will decide when to use the audio compression depending on source data and only if "Normal", "Good" or "Best" compression method is selected. "Force" applies the audio compression algorithm to all compressing data. It makes sense only if you are sure that all compressed files completely consist of raw audio data. "Disable" prohibits the audio compression algorithm at all.

The audio compression is designed to process raw audio data like WAV files. It does not increase compression of already compressed audio files like MP3.

Audio compression/Channels

Number of byte channels (can be 1 - 31).

WinRAR splits multibyte channels to bytes, for example, two 16-bit audio channels are considered by WinRAR as four channels one byte each. If this field is set to 0, WinRAR will detect a number of channels automatically.

True color compression/(Auto/Force/Disable)

In "Auto" mode WinRAR will decide when to use the true color compression depending on source data and only if "Normal", "Good" or "Best" compression method is selected. "Force" applies the true color compression algorithm to all compressing data. It makes sense only if you are sure that all compressed files completely consist of true color (RGB) data. "Disable" prohibits the true color compression algorithm at all.

The true color compression is designed to process raw RGB based color data like 24-bit BMP files. It does not increase compression of already compressed files like JPG.

Enable x86 executable compression

Allow WinRAR to improve compression of Intel x86 executable files using an algorithm specially optimized for this data type. It can be efficient for both 32 and 64 bit x86 executables.

Enable Itanium executable compression

Allow WinRAR to improve compression of Intel Itanium executable files using an algorithm specially optimized for this data type.

Enable delta compression

Allow WinRAR to improve compression of structured table data using an algorithm specially optimized for this data type.

Default button

Reset all options of this dialog to default values.


Compression settings

Compression settings dialog

To activate this dialog select "Settings…" command in Options menu and click on "Compression" tab. The dialog contents are described below. Note that most of compression options can be specified via the Compression profiles/Create default button.

More details about different compression parameters can be found in How to choose optimal archiving settings topic.

Compression profiles/Create default

In the dialog displayed after pressing this button you may specify default values for most compression options. Online help is available for all sections of the dialog, simply press "Help" button at any time to read detailed options description.

Options entered in this dialog are stored in the default compression profile, which name is "Default Profile", and are automatically restored before every archiving operation.

Some parameters of default compression profile are used not only when adding files to archive, but in other archive modification operations like deleting or renaming files. In this case WinRAR reads only those parameters, which are suitable for current operation. Extraction does not use any options from the default compression profile.

Compression profiles/Organize

Opens the dialog to organize compression profiles. In this Organize profiles dialog you may delete existing profiles or edit their parameters. For example, you may rename a profile or set it as default. Read online help associated with this dialog for more information.

Volume size list/Define volume sizes…

This button activates Define volume sizes dialog. Here you can customize the list of predefined volume sizes associated with "Split to volumes, size" field in Archive name and parameters dialog.

File types to open as archives first

Define how to handle Enter or double click on files with archive contents and non-archive name extension in WinRAR file list in file management mode. It does not affect processing of usual archives with extensions like .rar or .zip.

Specify one or more masks separated by spaces to choose files treated as archives. All files with non-archive extensions not matching these masks will be either executed or opened in their associated programs if such programs are available. For example, if *.exe mask is not present here and you press Enter on a self-extracting exe archive in WinRAR file list, WinRAR will run this SFX archive instead of displaying its contents.

If file matches any mask, WinRAR will attempt to open it as an archive first and only if it is not an archive, it will be procesed as a usual file. This option is ignored inside of archives, so archived files are opened in associated programs on Enter.

Regardless of this option, you can always browse any archive file contents, inside or outside of archive, with standard or non-standard extension, by pressing Ctrl+PgDn on its name in WinRAR file list.


Console RAR SFX module (WinCon.SFX)

Using this module you can create self-extracting archives, which can be extracted in text mode in Windows command prompt. This module cannot be executed in MS DOS.

WinRAR x64 also includes WinCon64.SFX, which is 64 bit version of this SFX module. By default WinRAR x64 uses 32 bit version, but you can select 64 bit module explicitly in SFX options: Module dialog. Resulting 64 bit SFX archive will work only in Windows x64.

This module supports the following command line switches:

-e Extract from archive (default action)

-t Test archive files

-v Verbosely list contents of archive

-? Show help

Exit codes returned by console self-extracting archives when terminating are the same as WinRAR exit codes.


Context menu items

"Choose items to display in Explorer context menus" options group lets you to select items to add to Explorer context menus. These items are displayed when you click on a file or archive icon in Explorer or Desktop by the right mouse button.

"Drag and drop context menu" options can be used to remove WinRAR archiving and extraction commands from context menu displayed after dragging and dropping files with right mouse button. By default, these options are enabled, so WinRAR proposes to compress files and unpack archives using a target folder as destination after right mouse button drag and drop.

"Where to check for SFX archives" options control processing of SFX archives in context menus. Checking contents of executable file and detecting if it is a self-extracting (SFX) archive introduces some delay when right clicking every ".exe" file, because WinRAR needs to read and analyze file data to find out if it is SFX. While such delay is negligible for fast local hard drives, it can be noticeable in case of slow network disks. This group of options allows to enable or disable SFX processing for local hard disks, network disks and other disks like CD-ROM and USB separately. If you turn these options off, you will not see all SFX related context menu items when right clicking SFX archive. So disable these options only if you really experience delays when right clicking ".exe" files.

Normally the context menu contains only extraction commands if single archive has been right clicked. You can override this by specifying one or more space separated masks in "Always display archiving items for", so archiving commands are always displayed for these file types even if file was recognized as archive. If you wish both archiving and extraction commands present for all archives, place "*" here.


"Define volume sizes" dialog

This dialog allows to customize the list of predefined volume sizes associated with "Split to volumes, size" field in Archive name and parameters dialog.

Use "Predefined sizes" options to select disk sizes to display in the list. If you need a value missing in "Predefined sizes", you can specify up to four additional list entries in "User defined sizes". Just enter a label and size for your entry. Label is any short text string and size is a numeric value in bytes. You can omit the label if you wish.

""Autodetect" string" option in "Other items" controls presence of "Autodetect" item in the list. If you never use autodetecting of volume size when compressing to removable media, you can turn this option off to make the list shorter.

"History entries" option defines the number of items previously entered by user and displayed at the top of list. You can set it to zero if you do not need to keep the history of manually entered volume sizes at all. Maximum value of this parameter can be 9.


Enter default password

In this dialog you may enter a default password, which will apply to the add, extract, test and view operations.

If "Show password" option is disabled and password is requested for archiving operation, you will be asked to type the password twice to ensure correctness.

If you set "Encrypt file names" option, WinRAR will encrypt not only file data, but all other sensitive archive areas like file names, sizes, attributes, comments and other blocks, so it provides a higher security level. Without a password it is impossible to view even the list of files in archive encrypted with this option. This option makes sense only when compressing data to RAR archive, it is ignored when the default password is used to decompress data or to compress to ZIP.

"ZIP legacy encryption" option is available only when adding files to ZIP archive. It enables use of ZIP legacy encryption algorithm. If this option is turned off, ZIP archives are encrypted with AES-256, which is more secure, but can be incompatible with some older versions of unzip tools.

If you enabled "Use for all archives" option and entered the empty string as a password, extract and test commands will skip all encrypted archives. All attempts to open encrypted files and archives will also be blocked until this option is turned off. This mode can be convenient if you are going to unpack a group of archives in unattended mode and want to avoid password prompts. "Use for all archives" is not available for non-empty passwords, because non-empty default passwords are applied to all archives automatically, without any additional options.

If you already saved some passwords, you can access them either using the drop down list associated with "Enter password" field or utilizing the autocomplete feature. Press "Organize passwords..." button to open "Organize passwords" dialog, where you can save frequently used passwords.

If saved passwords are protected with master password, you need to enter the master password and press "OK" to access them. If entered password does not match the master password, this dialog will treat it as a usual password for archive operations.


List of WinRAR exit codes

WinRAR exits with a zero code (0) in case of successful operation. Non-zero exit code indicates some kind of error:

Code value | Description
0 | Successful operation.
1 | Warning. Non fatal error(s) occurred.
2 | A fatal error occurred.
3 | Invalid checksum. Data is damaged.
4 | Attempt to modify a locked archive.
5 | Write error.
6 | File open error.
7 | Wrong command line option.
8 | Not enough memory.
9 | File create error.
10 | No files matching the specified mask and options were found.
11 | Wrong password.
255 | User break.


Extraction path and options dialog: advanced options

You may specify the following options in this dialog:

File time

Set modification/creation/last access time

Windows file systems keep three different time fields for each file: last modification, creation and last access. By default WinRAR stores only last modification time, but using file time options in Time part of archiving dialog you may enable storing of creation and last access time. Even if a desired time field is present in archive, it is also necessary to set the corresponding time option in the extraction dialog to restore it on extraction. Availability of these options depends on a concrete archive format, some formats do not support them.

Attributes

Clear attribute "Archive"

Clear attribute "Archive" on the extracted files. This option is designed for backup purposes.

Set file security

This option has meaning only for NTFS file system and allows to restore file owner, group, access control and audit information if it was previously saved in the archive. It is necessary to specify "Save file security data" option in Advanced part of archiving dialog to preserve security information when creating an archive. You need to have necessary privileges in order to use this facility. Processing of security data may decrease the speed of archiving operation, so set this option only if you understand its meaning and really need it, in most cases security processing is not required for home users.

This feature is supported only by RAR archives.

Set attribute "Compressed"

This option allows to restore NTFS "Compressed" attribute when extracting files. WinRAR saves "Compressed" file attributes when creating an archive, but does not restore them unless this option is specified.

This feature is supported only by RAR archives.

File paths

Extract relative paths

This mode is used by default. If you browse some archive subfolder in WinRAR shell, the path part up to and including the current subfolder will be removed from extracted file paths. For example, if you are inside of "Backup\MyData" archive folder and extract "Images" folder, it will be extracted as "Images", not as "Backup\MyData\Images".

If you browse the root archive folder or start extraction from context menu, this mode works exactly as Extract full paths option.

Extract full paths

WinRAR unpacks contents of archive including the path information into the destination folder. Unlike Extract relative paths mode, the path information is unpacked completely, regardless of current archive folder.

Do not extract pathnames

If the option is set, selected files from the root archive folder and from selected subfolders will be extracted into the destination folder. The path information is ignored.

Extract absolute paths

If archive was created using "Store full paths including the drive letter" mode selected in Files part of archiving dialog and you set "Extract absolute paths" option, WinRAR will create unpacked files in their original folders and disks. Be careful, do not set this option unless you are completely sure that archive does not contain malicious files. You may read more about potential benefits and dangers of "Extract absolute paths" mode in the description of -ep3 switch, which is the command line equivalent of this WinRAR option. This feature is supported only by RAR and ZIP archives.

Delete archive

Never

Do not delete an unpacked archive.

Ask for confirmation

Ask for user confirmation before deleting an unpacked archive.

Always

Delete an unpacked archive without a confirmation.

WinRAR deletes an archive only if it had been unpacked without errors and if all archived files were selected to unpack. If you unpack a multivolume archive, all its volumes will be deleted.

Note that you can save the default state of this option with "Save settings" button in General page of extraction dialog and it will also affect command line and context menu extraction commands. Use "Ask for confirmation" and especially "Always" mode with care. Deleting an unpacked archive can cause data loss if used improperly.

Miscellaneous

Background extraction

Minimize WinRAR to tray when starting the extraction process.

Wait if other WinRAR copies are active

Wait in the queue if other WinRAR copies are creating, modifying or unpacking an archive and start the operation only when other WinRAR tasks are complete or paused. If you are going to perform several archiving or decompressing tasks, such sequential execution can help to reduce amount of disk seeks and improve overall performance.

You can override this option for current operation by pressing "Continue" button in operation progress window. When you press "Continue", WinRAR stops waiting regardless of other copies activity.

This option is not supported for 7z archives.

Allow absolute paths in symbolic links

If this option is off, extraction command skips symbolic links pointing outside of destination folder, with absolute paths, excessive number of ".." in link target or with other potentially dangerous link parameters. Links pointing to folders outside of extraction destination folder can present a security risk. Enable this option only if you are sure that archive contents is safe, such as your own backup.

Links that are considered safe by WinRAR are extracted always regardless of this option.

Allow potentially incompatible names

While NTFS file system permits file names with trailing spaces and dots, a lot of Windows programs fail to process such names correctly. If this option is turned off, WinRAR removes trailing spaces and dots, if any, from file names when extracting.


Extraction path and options dialog: general options

This part of extraction dialog enables to select the destination folder for extracted files and set some general options. By default the destination folder is the same as the archive name and is placed in the current folder, but you may change the default value using Compression settings. You can enter the new path (which will be created if does not already exist) in "Destination path" field or select an existing folder from the folders tree pane.

The dialog attempts to choose an entering folder name in the tree automatically as you type, but only after a small delay (about 0.5s), if the entered path contains a drive letter and if such automatic selection does not take too much time. If folder does not exist, either its parent or another folder most similar to the entered one will be selected. Also you may force the dialog to immediately search for the entered folder name by pressing Display button, which may be useful if you need to locate a folder proposed when opening the dialog or if automatic selection was aborted because of low speed.

You can create a new folder using New folder button. It will be created in a folder selected in tree pane or specified in "Destination path" field, depending on what you changed last. Use F2 key to rename folders in tree pane, Del to remove them and F5 to refresh the tree contents.

Extraction dialog is resizable. You can use the mouse to drag its border to the desired size to provide more space for folder list pane. WinRAR will store new dimensions of this dialog.

Additionally to destination path, the general part of extraction dialog provides the following options:

Update mode

Extract and replace files (default)

Extract all selected files.

Extract and update files

Extract those selected files, which copies either not present in the target folder or older than extracting files.

Freshen existing files only

Extract only those selected files, which exist in the target folder and older than the corresponding file in the archive. If a file not present on disk, it will be skipped.

Overwrite mode

Ask before overwrite (default)

Prompts before overwriting a file.

Overwrite without prompt

Files are overwritten without any prompt.

Skip existing files

Do not overwrite files which are already exist.

Rename automatically

Rename extracted files automatically if file with the same name already exists. Renamed file will get the name like 'filename(N).txt', where 'filename.txt' is the original file name and 'N' is a number.

Miscellaneous

Extract archives to subfolders

This option is available only when more than one archive is unpacked. It will place unpacked contents of each archive to separate subfolder, which name will be generated basing on the archive name.

Keep broken files

WinRAR will not delete files which are not extracted properly, for example, when the archive is damaged (by default, WinRAR deletes such files). You can try to save part of the information from a broken file.

Display files in Explorer

After the extraction is finished, WinRAR will open Explorer window displaying contents of destination folder.

Save settings

Press "Save settings" button if you wish to save the current state of both parts (General and Advanced) of extraction dialog. Saved state will be restored as the default when activating the dialog next time. WinRAR saves all options except the destination path. If you need to specify the default destination folder, use Compression settings dialog.


File list settings

File list settings dialog

To activate this dialog select "Settings…" command in Options menu and click on "File list" tab. The dialog contents are described below.

List type (List view or Details)

Selects either List view (multicolumn, only file icons are displayed) or Details view (single column, an additional size, date and type information is provided for each file). The default mode is Details view.

List style/Show grid lines

Show grid lines in the file list.

List style/Full row select

Use the full row cursor.

List style/Checkboxes

Use checkboxes to select list items. Available in Windows Vista and newer.

Files/Show archives first

Display archives in the file list before all other files regardless the current sort mode.

Files/Show encrypted or compressed NTFS files in color

If enabled, WinRAR will display files with NTFS "Compressed" and "Encrypted" attributes using the same colors as Explorer. By default these are blue color for "Compressed" and green for "Encrypted" attribute.

Files/Merge volumes contents

If this option is enabled and you open the first volume, WinRAR also tries to read and display contents of all next volumes available in the same folder as the first volume. So instead of looking at files contained only in the first volume, you will see files contained in the first and all following volumes.

Files/Show seconds

Display seconds in file dates in the file list. Without this option WinRAR displays dates in file list with 1 minute precision.

Files/Exact sizes

If this option is on, file sizes are always displayed in bytes. If it is off, sizes are rounded up and use units such as KB or MB. Smaller files can be still displayed in bytes. This option can affect also other parts of WinRAR interface, for example, total and selected sizes in status bar.

Files/Columns…

Select columns to display in file and archive management modes.

Files/Set font…

Select font for the file list and folder tree panel.

Selection

Here you may set different styles of mouse selection in the list. Set "Single click to open an item", if you wish Internet browsers style selection. In this mode you also may choose if you need to underline file names. The default WinRAR mode is "Double click to open an item"


File menu

Command | Shortcut | Function
Open archive | Ctrl+O | Open the specified archive. You may also read about other methods to open an archive.
Save archive copy as... |  | Save a copy of archive opened in WinRAR shell to another folder.
Change drive | Ctrl+D | Change the current drive
Set default password | Ctrl+P | Set the default password. The password must be entered twice to ensure correctness. This password will be used in all archiving and extracting operations.
Copy files to clipboard | Ctrl+C | Copy selected archived or usual files to the clipboard. For example, you may select some files in archive, press Ctrl+C, open a folder in Explorer and press Ctrl+V to unpack selected files to that folder. You may press Ctrl+V in a text editor to paste only file names instead of file contents.
Paste files from clipboard | Ctrl+V | Pasting files to WinRAR initiates the archiving operation, so you may select files in Explorer and paste them to WinRAR to compress them.
Copy full names to clipboard |  | Copy only full names of selected files or folders to clipboard, not file contents.
Select all | Ctrl+A | Select all files and folders
Select group | Gray + | Select all files and folders corresponding to an entered mask
Deselect group | Gray - | Deselect all files and folders corresponding to an entered mask
Invert selection | Gray * | Invert the selection of all files and folders
Exit | Alt+F4, Ctrl+W | Exit from WinRAR

Depending on "Keep archives history" option in General settings dialog, a few names of recently opened archives can be present below "Exit" command. You may use them to quickly open these archives in WinRAR.


General settings

General settings dialog

To activate this dialog select "Settings…" command in Options menu and click on "General" tab. The dialog contents are described below.

System/Low priority

WinRAR uses this parameter to regulate system load in a multitasking environment. Usually the default priority is the best choice, so you do not need to activate this option, but if you frequently run WinRAR in the background while working with other applications, you may wish to set low priority.

System/Multithreading

If enabled, WinRAR will use the multithreaded version of compression algorithm providing the higher speed on multiprocessor or multicore architectures. By default this option is turned on if number of processors reported by the operating system is more than one, but it is possible to enable it manually even in a single processor system.

This option affects not only compression, but also other WinRAR modules, which can start several threads. Usually its default state proposed by WinRAR is optimal, so normally you do not need to change it.

History/Keep archives history

By default WinRAR keeps names of a few recently opened archives in File menu, so you may quickly access them again. But if you need to disable it, for example, for security purposes, you may clear this option.

Also, if this option is on, WinRAR adds opened archives to Windows recent documents list. If "Keep archives history" is off, Windows maintains the recent documents list itself and in such case archive names may or may not be added to it depending on Windows version and settings.

History/Allow history in dialogs

Some input fields in many WinRAR dialogs support lists of previously entered strings, which allow to restore a earlier entered value (an archive name, destination path, etc.) quickly. It may save user's time, but like the previous option, security of such feature may be questionable in multi-user environment. So if you share your computer with other people, you may wish to disable it.

Toolbar/Buttons size

Choose the toolbar buttons size. Available only with the default WinRAR interface theme.

Toolbar/Show buttons text

Controls displaying of button titles.

Toolbar/Lock toolbars

Prevent moving or resizing toolbars by user. You may enable this option to avoid an accidental modification of toolbars position or size after you already customized toolbars to your needs.

Toolbar/Toolbars…

Activates the dialog allowing to turn on or off the main WinRAR toolbar, the additional small toolbar containing "Up one level" button and address bar with path or archive information.

Toolbar/Buttons…

Press "Buttons…" to open the dialog, where you may choose toolbar buttons.

Interface/Activate Wizard on start

Switch WinRAR to Wizard mode, just after it started.

Interface/Enable sound

Enable WinRAR to produce sounds in case of errors or finishing long operations.

Interface/Show archive comment

Display comment window, if an opened archive has a comment.

Interface/Reuse existing window

If an attempt is made to open a new archive executing "WinRAR <arcname>" command or clicking on archive icon and a WinRAR window already exists, the archive will be opened in the already existing window. If this option is not enabled, a new window will be created.

Interface/Always on top

Place WinRAR window above all other programs. You may set it if you frequently use WinRAR as a drag and drop target.

Interface/Full paths in title bar

Display the full path of currently opened folder or archive in WinRAR title bar.

Interface/Windows progress bars

This option controls look of progress bars in window displaying archiving and extraction progress. If enabled, WinRAR will use standard Windows progress bars. If disabled, WinRAR version of progress bars will be used. It may be reasonable to turn this option off in older Windows versions and enable it in Windows Vista and later, where controls have a new impressive look. Note that Windows progress bars are two color only, so unlike WinRAR progress bars they do not indicate the current compression ratio. But the compression percent is also displayed in separate line of progress window.

Interface/Taskbar progress bar

If this option is enabled, WinRAR will display the total progress of operation also on WinRAR icon on Windows taskbar. Taskbar progress feature is available only beginning from Windows 7, so "Taskbar progress bar" option is disabled in older Windows versions.

Logging/Log errors to file

Write error messages and information on archive damage to the file rar.log in %APPDATA%\WinRAR folder. This option is available only after registration. Use "View log…" command in Options menu to view contents of log file.

Logging/Limit log file size to <nnn> KB

Enables to limit size of rar.log file produced by WinRAR. The minimum allowed log file value is 50KB.


Archive name and parameters dialog: advanced options

Save file security data

This option has meaning only for NTFS file system and allows to save file owner, group, access control and audit information. You need to have necessary privileges in order to use this facility. Processing of security data may decrease the speed of archiving operation, so set this option only if you understand its meaning and really need it, in most cases security processing is not required for home users.

This option is supported only for RAR archives.

Save file streams

This option has meaning only for NTFS file system and allows to save alternate data streams associated with a file. You may need to set it if you use software storing data in alternative streams. Streams are not saved for NTFS encrypted files.

This option is supported only for RAR archives.

Store symbolic links as links

Store NTFS symbolic links and reparse points as links, so file or folder contents is not archived. Such archive entries are restored as symbolic links or reparse points when extracting. You may need to run WinRAR as administrator to create symbolic links when extracting. Symbolic links pointing outside of destination folder, with absolute paths, excessive number of ".." in link target or with other potentially dangerous link parameters, can present a security risk and are extracted only if "Allow absolute paths in symbolic links" option in extraction dialog is set or -ola switch is specified. Supported for RAR 5.0 archives only.

Store hard links as links

If archiving files include several NTFS hard links, store the first archived hard link as usual file and the rest of hard links in the same set as links to this first file. When extracting such files, WinRAR will create hard links instead of usual files.

You must not delete or rename the first hard link in archive after the archive was created, because it will make extraction of following links impossible. If you modify the first link, following links will also have the modified contents after extracting. Extraction command must involve the first hard link to create following hard links successfully. Supported for RAR 5.0 archives only.

Pause after each volume

By default WinRAR asks for confirmation before creating or unpacking next volume only for removable disks. This option forces WinRAR to ask such confirmation always. It can be useful if disk space is limited and you wish to copy each volume to another media immediately after creation.

This option is supported only for RAR volumes.

Old style volume names

By default RAR volumes have names like 'volname.partNNN.rar', where NNN is the volume number. For RAR 4.x archive format using this option it is possible to select another, extension based naming scheme, where the first volume file in a multi-volume set has the extension .rar, following volumes are numbered from .r00 to .r99. RAR 5.0 archives do not support this option and extension based names.

Recovery volumes

This option is available only when you create RAR multivolume archive, in this case you just need to select the number of recovery volumes to create. You may also append a percent character to this parameter, in such case the number of creating .rev files will be equal to this percent taken from the total number of RAR volumes. Each recovery volume allows to reconstruct one missing volume file. You may read more about this feature here.

Background archiving

Minimize WinRAR to tray when starting the archiving process.

Wait if other WinRAR copies are active

Wait in the queue if other WinRAR copies are creating, modifying or unpacking an archive and start the operation only when other WinRAR tasks are complete or paused. If you are going to perform several archiving or decompressing tasks, such sequential execution can help to reduce the amount of disk seeks and improve overall performance.

You can override this option for current operation by pressing "Continue" button in operation progress window. When you press "Continue", WinRAR stops waiting regardless of other copies activity.

Recovery record

Specify the recovery record size as a percent of total archive size. Larger recovery record allows to recover from more serious damage, but it also increases an archive size and processing time, so 3 - 10% is probably optimal. This value is used only if you enabled "Add recovery record" option on General page of this dialog. You cannot set it to zero. If you do not need the recovery record, turn off "Add recovery record" option instead.

Compression…

Opens Advanced compression parameters dialog, where you may configure different modules of WinRAR compression algorithm. Improper settings in this dialog may seriously hurt archiver performance, so use it carefully.

SFX options

Selects a self-extracting module and sets a number of optional SFX parameters like a destination folder or window title. Note that SFX parameters are applicable only to Windows GUI module and are not supported by console or non-Windows SFX. The "SFX options" button is available only if you enabled "Create SFX archive" option in the General options of this dialog.

It is possible to store selected SFX options in a compression profile, WinRAR puts commands describing SFX parameters to the archive comment.

When done

This option allows to turn PC off, hibernate, sleep or restart when archiving is done. Appropriate power features must be supported by operating system.


Archive name and parameters dialog: backup options

Erase destination disk contents before archiving

All files and folders on the target disk will be erased before starting the archiving operation. If you create volumes, erasing will be performed before creating of each volume, giving you the chance to archive to non-empty removable disks. But you must be sure that disks do not contain any useful information. The option applies only to removable media, hard disk cannot be erased using this function.

Add only files with attribute "Archive" set

Only those files which have attribute "Archive" set, will be added. Folders are added regardless of their attributes. This option is designed for backup purposes.

Clear attribute "Archive" after compressing

Clear attribute "Archive" on successfully compressed files. Folder attributes are not changed. This option is designed for backup purposes.

Open shared files

Allows to process files opened by other applications for writing. It helps if an application allowed read access to file, but if all types of file access are prohibited, file open operation still will fail.

This option could be dangerous, because it allows a file to be archived, while that file may be in the process of being modified by an other application. Use with great care.

Generate archive name by mask

Appends the current date string to an archive name when creating an archive. Useful for daily backups. The date string is formatted by the specified mask. Read description of switch -ag for details.

Keep previous file versions

Forces WinRAR to keep previous file versions when updating files in the already existing archive. Old versions are renamed to 'filename;n', where 'n' is the version number. Supported only by RAR archives.

When using this option, it is recommended to avoid names in 'filename;n' format among files to add. Such names can lead to duplicate entries if old version with same name either is present in archive or will be created later.


Archive name and parameters dialog: comment

Here you may specify an archive comment to add to a new or updated archive. You may either enter a name of a file containing comment text in the "Load comment from the file" field or enter a comment manually in the "Enter comment manually " window.


Archive name and parameters dialog: files

Files to add

Names of files and folders to compress. This field is automatically filled by selected file names, but, if necessary, you may edit them manually or press "Append" button to choose more files to add to the list.

It is allowed to enter wildcard masks here. In this case WinRAR will search for files matching a mask in the current folder and all subfolders. If you need to specify several masks, separate them by spaces. If mask contains spaces, enclose it in quotes. For example, you may enter:

*.txt *.doc "set 1.*"

to archive all .txt and .doc files and files matching "set 1.*" mask.

Files to exclude

File masks and file names to exclude from the archiving operation. Wildcards are supported both in path and name parts of masks. If you need to specify several masks, separate them by spaces. If mask contains spaces, enclose it in quotes. For example, you may enter:

c:\temp\info.txt *.bak *.tmp *\temp\

to skip c:\temp\info.txt file, all .bak and .tmp files, all temp folders and all files in temp folders. You may enter file names manually or use "Append" button to browse for file to exclude.

Detailed information about exclusion masks syntax is provided in description of switch -x. This switch uses the same format of exclusion masks as "Files to exclude" field.

Files to store without compression

File masks and file names to store without compression. This option may be used to store already compressed files, which helps to increase archiving speed without noticeable loss in the compression ratio. If you need to specify several masks, separate them by spaces. If mask contains spaces, enclose it in quotes. For example, you may enter:

*.rar *.zip *.jpg

to store without compression all RAR and ZIP archives and JPG images.

File paths

Select the method of storing file paths in archive. WinRAR can store relative paths which is the default mode, full file paths except the drive letter and leading backslash character, file names only without paths or full paths including the drive letter.

Relative paths mode excludes the current WinRAR folder. For paths entered manually in "Files to add" field it excludes the base folder up to last path separator similarly to -ep1 switch.

If you store names without paths, it is possible to create an archive containing several files with the same name, so use "Do not store paths" option with care.

If you store full paths including the drive letter, WinRAR will replace drive separators (colons) by underscore characters. WinRAR is able to change underscores back to colons and create unpacked files in their original folders and disks, if you set "Extract absolute paths" option in "Advanced" part of extraction dialog. You may read more about potential benefits and dangers of "Store full paths including the drive letter" mode in the description of -ep3 switch, which is the command line equivalent of this WinRAR option.

Put each file to separate archive

Put each selected file or folder to separate archive. If you set this option, an entered archive name is treated only as a destination path for new archives (if it is not a folder, its name part is ignored) and archive names are generated basing on file names.

Double extensions for archives

This option modifies "Put each file to separate archive" behavior. If "Double extensions for archives" is on, archives produced by "Put each file to separate archive" will have names in filename.ext.rar style, with archive extension appended to file name. If this option is off, we'll have filename.rar archives with a file extension replaced by archive extension. Even if this option is off, WinRAR can apply the double extension mode to files which have the same name part and differ in extension only.

Archives in subfolders

This option modifies "Put each file to separate archive" behavior. If "Archives in subfolders" is on, "Put each file to separate archive" will place every file in selected subfolders to separate archive. If this option is off, the entire contents of every selected folder will be stored to separate archive.

Send archive by email to [<addr>] [and then delete]

This option allows to attach a created archive to email message. You need to have an installed MAPI compliant email program to use this option (most modern email programs support MAPI interface). If you do not enter a destination email address here, it will be asked by your email program. It is possible to specify several addresses separated by commas or semicolons. If you set "and then delete" option, an archive will be deleted after it was successfully attached to an email.

If Send archive by email option is used when creating a multivolume archive, every volume will be attached to a separate email message.


Archive name and parameters dialog: general options

The dialog contains the following items:

Destination archive name

Enter the name manually or press the "Browse" button to browse for the archive name. You may enter a name containing a disk letter or the full path to the archive.

Profiles...

Opens the menu allowing to create new, organize and select compression profiles. Compression profiles allow you to quickly restore previously saved compression options or to specify default options for this dialog. WinRAR provides a few predefined profiles optimized for creating e-mail attachments, backup files and other operations. Name of currently active profile is displayed above "Profiles..." button. Please see the topic Compression profiles for more information.

Archive format (RAR, RAR4, ZIP)

Select format of newly created archive. You can specify RAR to use the latest RAR 5.0 format, RAR4 for format compatible with WinRAR 4.x or ZIP to create ZIP archive. Depending on the archive format selected, some advanced options not supported by target format will be disabled. If you update an existing archive, this option is ignored and WinRAR uses the format of updating archive.

Compression method

Choose between "Store", "Fastest", "Fast", "Normal", "Good" and "Best" methods. "Store" writes files to archive at maximum speed and without compression. All following methods compress data, providing a higher compression ratio and lower speed when going from "Fastest" to "Best".

Dictionary size

This is a size of memory area used to find and compress repeated patterns in processing data. Larger compression dictionary sometimes allows to improve the compression ratio of big files, especially when creating a solid archive. But larger dictionary also decreases the compression speed and increases memory requirements. Compression needs about 6 times more memory than dictionary size. Decompression takes slightly more memory than just 1 dictionary size. If you expect your RAR 5.0 archive to be decompressed on all kinds of computers, including those with small memory, better avoid maximum dictionary sizes and select something in the middle, like 32 or 64 MB.

Maximum dictionary size for RAR 4.x archives is 4 MB. RAR 5.0 format allows to create archives with up to 1 GB dictionary in 64 bit WinRAR version and up to 256 MB in 32 bit WinRAR (up to 128 MB in Windows XP x86). Decompression needs less memory than compression, so both 32 and 64 bit WinRAR can decompress archives with all dictionary sizes including 1 GB provided that computer has more than 1 GB of available memory. ZIP format dictionary size is fixed to 32 KB.

If size of all source files for solid archive or size of largest source file for non-solid archive is at least twice less than dictionary size, WinRAR can reduce the dictionary size. It helps to lower memory usage without decreasing compression.

Volume size in "Split to volumes, size" field

If you wish to create volumes, enter a size of single volume here. You can choose size units in the drop down list to the right of size field. In this list "B" means bytes, "KB" - kilobytes, "MB" - megabytes and "GB" - gigabytes.

It is allowed to enter decimal fractions using the decimal symbol defined in Windows regional settings.

Also it is possible to select units by appending one or two characters to volume size string. Lowercase 'k' means kilobytes, uppercase 'K' - thousands of bytes, 'm' - megabytes, 'M' - millions of bytes, 'g' - gigabytes, 'G' - billions (milliards) of bytes. "KB", "MB" and "GB" always mean kilobytes, megabytes and gigabytes regardless of character case.

Volume size input field has the associated drop down list containing previously entered, predefined and defined by user values. You can use this list to quickly select any of items it contains. This list can be customized with Define volume sizes dialog. To activate it press "Define volume sizes…" button in Compression settings dialog.

If you are archiving to removable disks and using RAR format, you may select "Autodetect" from the list and WinRAR will choose the volume size automatically for each new volume.

Update mode

  • Add and replace files (default). Always replace archived files, which have same name as files to be added. Always add those files, which are not present in the archive.
  • Add and update files. Replace archived files only if added files are newer. Always add those files, which are not present in the archive.
  • Freshen existing files only. Replace archived files only if added files are newer. Do not add those files, which are not present in the archive.
  • Ask before overwrite. Ask for confirmation to overwrite archived files, which have same name as files to be added. Always add those files, which are not present in the archive.
  • Skip existing files. Do not replace archived files, which have same name as files to be added. Always add those files, which are not present in the archive.
  • Synchronize archive contents. Replace archived files only if added files are newer. Always add those files, which are not present in the archive. Delete those archived files, which are not present in the added files. It looks similar to creating a new archive, but with the one important exception: if no files are modified since a last backup, the operation is performed much faster than the creation of a new archive.

Delete files after archiving

Remove successfully archived source files.

Create SFX archive

Creates a self-extracting archive (exe file), which can be unpacked without using any other programs. You may select the type of SFX module and set a few other SFX parameters like a destination folder in the Advanced options of this dialog.

Create solid archive

Creates a solid archive. Usually gives higher compression ratios, but applies some restrictions. Read the description of solid archives for more details.

Add recovery record

Adds the recovery record, which may help to restore an archive in case of damage. You can specify the recovery record size in Advanced options of this dialog. Default value is 3% of total archive size.

Test archived files

Test files after archiving. This option is especially useful if "Delete files after archiving" is also enabled. In this case files will be deleted only if the archive had been successfully tested.

Lock archive

>WinRAR cannot modify locked archives, so locking important archives prevents their accidental modification by WinRAR. This option is not intended or able to prevent modification by other tools or willful third party. It implements a safety measure only for accidental data change by WinRAR.

Set password

Set a password to encrypt archived files. It is valid only during a single archiving operation and overrides the default password entered in File menu. If the default password is present, it will be restored after the archiving operation is completed. If the default password was absent before starting archiving, it also will be absent after finishing the operation.


Archive name and parameters dialog

This dialog is displayed when executing Add to archive command before adding files to an archive.

Options contained in this dialog are divided into a few separate groups. Select any of the items below for a detailed description of the group:

  • General
  • Advanced
  • Options
  • Files
  • Backup
  • Time
  • Comment


Archive name and parameters dialog: options

Delete mode

All delete options listed below modify the behavior of "Delete files after archiving" from General options. They have an effect only if "Delete files after archiving" is on. You can enable any of these options in the default compression profile to change the default behavior of "Delete files after archiving".

Delete files

Delete files normally. Files are deleted permanently, but not securely, so sometimes it may be possible to recover them using special software.

Move files to Recycle Bin

Deleted files are placed to Recycle Bin.

Wipe files

Before deleting file data are overwritten by zero bytes to prevent recovery of deleted files, file is truncated and renamed to temporary name.

Please be aware that such approach is designed for usual hard disks, but may fail to overwrite the original file data on solid state disks, as result of SSD wear leveling technology and more complicated data addressing.

Wipe files if password is set

If this option is on and files are archived with a password, "Wipe files" mode is enabled regardless of other options in "Delete mode" group.

There is no much sense to enable it directly in archiving dialog, because you can just turn on "Wipe files" instead. So this option is intended for use in compression profiles. If you prefer to always delete encrypted files securely, you can enable "Wipe files if password is set" in the default compression profile.

Archive features

Use BLAKE2 file checksum

Store BLAKE2 file checksums. Available only for RAR 5.0 archive format.

File data integrity in RAR archive is protected by checksums calculated and stored for every archived file. By default, WinRAR uses CRC32 function to calculate the checksum. RAR 5.0 archive format also allows to select BLAKE2sp version of BLAKE2 hash function instead of CRC32.

CRC32 output is 32 bit length. While CRC32 properties are suitable to detect most of unintentional data errors, it is not reliable enough to verify file data identity. In other words, if two files have the same CRC32, it does not guarantee that file contents is the same.

BLAKE2 output is 256 bit. Being a cryptographically strong hash function, it practically guarantees that if two files have the same value of BLAKE2, their contents is the same. BLAKE2 error detection property is also more reliable than in shorter CRC32.

Since BLAKE2 output is longer, resulting archive is slightly larger, when this option is enabled.

If archive headers are unencrypted (Encrypt file names option was not set), checksums for encrypted RAR 5.0 files are modified using a special password dependent algorithm, to make impossible guessing file contents based on checksums. Do not expect encrypted file checksums to match usual CRC32 and BLAKE2 values.

Save identical files as references

If this option is enabled, WinRAR analyzes the file contents before starting archiving. If several identical files larger than 64 KB are found, the first file in the set is saved as usual file and all following files are saved as references to this first file. It allows to reduce the archive size, but applies some restrictions to resulting archive. You must not delete or rename the first identical file in archive after the archive was created, because it will make extraction of following files using it as a reference impossible. If you modify the first file, following files will also have the modified contents after extracting. Extraction command must involve the first file to create following files successfully.

It is recommended to use this option only if you compress a lot of identical files, will not modify an archive later and will extract an archive entirely, without necessity to unpack or skip individual files. If all identical files are small enough to fit into compression dictionary, solid archiving can provide more flexible solution than this option.

Supported for RAR 5.0 archives only.

Quick open information

RAR archives store every file header containing information such as file name, time, size and attributes immediately before data of described file. This approach is more damage resistant than storing all file headers in a single continuous block, which if broken or truncated would destroy the entire archive contents. But while being more reliable, such file headers scattered around the entire archive are slower to access if we need to quickly open the archive contents in a shell like WinRAR graphical interface.

To improve archive open speed and still not make the entire archive dependent on a single damaged block, RAR 5.0 archives can include an optional quick open record. Such record is added to the end of archive and contains copies of file names and other file information stored in a single continuous block additionaly to normal file headers inside of archive. Since the block is continuous, its contents can be read quickly, without necessity to perform a lot of disk seek operations. Every file header in this block is protected with a checksum. If WinRAR detects that quick open information is damaged, it resorts to reading individual headers from inside of archive, so damage resistance is not lessened.

Quick open record contains the full copy of file header, which may be several tens or hundreds of bytes per file, increasing the archive size by the same amount. This size increase is most noticeable for many small files, when file data size is comparable to file header. So by default, in "Add for larger files" mode, WinRAR stores copies of headers only for relatively large files and continues to use local headers for smaller files. Concrete file size threshold can depend on WinRAR version. Such approach provides a reasonable open speed to archive size tradeoff. If you prefer to have the maximum archive open speed regardless of size, you can use "Add for all files" to store copies of all file headers. If you need to have the smallest possible archive and do not care about archive open speed in different programs, set "Do not add" to exclude the quick open information completely.

If you wish to measure the performance effect of this option, be sure that archive contents is not stored in a disk cache. No real disk seeks are performed for cached archive file, making access to file headers fast even without quick open record.


Archive name and parameters dialog: time options

Store modification, creation, last access time

Enable storing file modification, creation, last access times in archive. Supported only by RAR archives. Only RAR 5.0 archive format allows to disable storing the file modification time. If one of these file times is not saved in archive, it will be assigned to the current system time when extracting.

You need to enable "Set creation time" and "Set last access time" options in Advanced part of extraction dialog to restore these times when extracting files. "Set modification time" is enabled by default.

High precision time format

If this option is disabled, file time is stored with 2 second precision for RAR 4.x and ZIP archives and with 1 second precision for RAR 5.x archives. Enabling this option slightly increases the archive size, but allows to preserve the file time with 0.0000001 second precision.

If this option is enabled for ZIP format, all three file times (modification, creation, last access) are stored with the high precision. Unlike RAR format, we cannot store a single file time with the high precision in ZIP.

Preserve source files last access time

By default the last access time of source files is changed after archiving. We can enable this option if we wish to preserve the original value of this time. This option keeps the original last access time of archiving files, but it does not control which timestamps are to be stored in archive. For example, if we wish to save the last access time to archive and preserve the last access time of source files, we need to use this and "Store last access time" options together.

Include files: of any time / older than / newer than / before / after

The default value of this option is "any time", so WinRAR will archive all selected files regardless of their time stamp. But changing it to "older than" or "newer than" you may force WinRAR to archive only those files which modification, creation or last access time is older or newer than a specified number of days, hours and minutes. For example, it can be useful if you wish to archive only files modified in last 3 days. Using "before" or "after" options you may choose only those files which modification, creation or last access time is older or newer than specified date.

"Newer than" and "after" options also include files matching the specified date exactly. "Older than" and "before" exclude such files.

Set archive time to: current system time / original archive time / latest file time

Default value for this option is the "current system time", so every new or modified archive receives the current system time as modification file time. But you also may set this option to the "original archive time" to prevent the archive time from changing or to the "latest file time" to set the modification time of a changed archive to the time of newest file in the archive.


GUI RAR and ZIP SFX modules (Default.SFX and Zip.SFX)

Using these two modules you may create GUI (graphic mode) self-extracting archives for Windows.

Use Default.SFX module for RAR archives and Zip.SFX for ZIP archives.

WinRAR x64 also includes Default64.SFX and Zip64.SFX, which are 64 bit versions of these SFX modules. By default WinRAR x64 uses 32 bit versions, but you can select 64 bit modules explicitly in SFX options: Module dialog. Resulting 64 bit SFX archive will work only in Windows x64.

Both these modules support simple setup commands and command line options. Use links below to read more about it:

  • SFX setup commands;
  • SFX command line options.

Notes

  1. It is allowed to edit Windows resources contained in SFX modules to adapt them for your needs. For example, you may wish to resize the start dialog or add some graphics to it. WinRAR does not provide tools or documentation for modifying resources. It is rather complicated process and if you wish to do so, you must already have a resource editor and you must know how to work with it. But you do not need to edit resources if the standard SFX start dialog is acceptable for you. Also if you need to change only SFX bitmap or icon, you can use "Text and icon" page of Advanced SFX options dialog.
  2. By default, exit codes returned by GUI self-extracting archives when terminating are the same as WinRAR exit codes. It is possible to modify this behavior with SetupCode command, so SFX will also return setup program exit codes.


GUI SFX modules: command line options

WinRAR GUI SFX modules support several command line options listed below.

Option | Description
-d<path> | Set the destination folder for unpacked files.
-p<pwd> | Specify a password for encrypted SFX archive.
-s, -s1, -s2 | Silent mode. Switch -s is a brief form of -s1. Both -s and -s1 hide SFX dialog and extraction progress. -s1 also hides the license dialog. -s2 hides the start dialog, but extraction progress is displayed.
-sp<par> | If application specified in Setup SFX command does not have any parameters, you can define parameters passed to such application using this switch. If parameters are already present in Setup command, this switch is ignored. Setup application can also read the full SFX command line from sfxcmd environment variable. sfxpar environment variable contains SFX command line parameters only, without leading module name

If you need to insert a quotation mark character into command line parameter, use two consecutive quotation marks to do that.


GUI SFX modules: setup commands

WinRAR GUI SFX modules support simple setup commands. You may put them to the SFX archive comment. Setup commands are listed below. Click on the command name for the detailed description.

Delete | Delete a file before extraction
License | Display a program license
Overwrite | Select file overwrite mode
Path | Set the default destination path
Presetup | Run the specified program before extraction
SavePath | Store the destination path
Setup | Run the specified program after successful extraction
SetupCode | Wait for setup program termination and return its exit code
Shortcut | Create a shortcut to unpacked file
Silent | Skip the start dialog
TempMode | Unpack to the temporary folder
Text | Add text to the SFX dialog text window
Title | Set SFX dialog title
Update | Select file update mode

SFX module expands environment variables in command parameters, so it is allowed to use commands like:

Path=%temp%\myapp

Setup=mysetup.exe %sfxpar%

(see Setup for sfxpar variable description).

Here you may look at the simple example of the complete installation script.


Integration settings

Integration settings dialog

To activate this dialog in WinRAR select "Settings…" command in Options menu and click on "Integration" tab. The same set of options also is available when installing WinRAR, so it is possible to change the described below options both during installation and later, in WinRAR settings.

Associate WinRAR with (RAR, ZIP, etc.)

Associate WinRAR as default viewer for selected formats. It is reasonable to leave these options selected, so you can open archives in WinRAR by double clicking on archive name or icon in Explorer or Desktop. "Toggle all" button selects all formats at once or deselects them if all they are already selected.

User defined archive extensions

Here you can specify additional file name extensions for archive formats supported by WinRAR. For example, if you have files with ".dat" extension, which are in RAR format, you can enter "dat" in this field to associate WinRAR with such files and add extraction commands to context menus displayed for "dat" files in Windows shell. If you need to enter several extensions, separate them by spaces.

This option is available only in WinRAR settings, but not in WinRAR installer.

Interface/Add WinRAR to Desktop

Add WinRAR icon to the Desktop.

Interface/Add WinRAR to Start Menu

Add WinRAR icon to the Start Menu.

This option adds WinRAR icon to top level of classic style Start Menu in Windows XP. Starting from Windows Vista, programs cannot add themselves to the top of the Start menu, so this option adds WinRAR icon to "All Programs" list. You can use "Pin to Start Menu" Windows command if you need to add an application icon to top of Start Menu in Windows Vista and newer.

Interface/Create WinRAR program group

Create a WinRAR program group in Start Menu/Programs.

Shell integration/Integrate WinRAR into shell

Allows the use of context menus and drag and drop for handling WinRAR archives.

Shell integration/Cascaded context menus

Place all items added by WinRAR to file and archive context menus into submenu.

Shell integration/Icons in context menus

Add small icons to items added by WinRAR to file and archive context menus.

Shell integration/Context menu items

Choose items to display in Explorer context menus.


Internal viewer

Commands of the internal viewer.

Menu/Item | Shortcut | Function
File/Exit | Alt+F4, Ctrl+W | Exit from the internal viewer
Edit/Copy | Ctrl+C | Copy selected text to the clipboard
Edit/Select all | Ctrl+A | Select all viewed text
Edit/Find | Ctrl+F | Find a string in the text
Edit/Find next | F3 | Find the next occurrence of a string
View/View as Windows text | Ctrl+I | Use Windows character table
View/View as DOS text | Ctrl+D | Use DOS character table
View/View as Unicode (UTF-16LE) |  | View text as Unicode in UTF-16 little endian format
View/View as Unicode (UTF-8) |  | View text as Unicode in UTF-8 format
View/Word wrap | Ctrl+S | Switches word wrapping
View/Set Font… |  | Set viewer font
Help/View help | F1 | Show internal viewer help

To change the current character table you may click on the right part of the viewer status bar, where the name of the current table is displayed. The default character table may be specified in Viewer settings dialog.


Selecting files

Before performing any operation you need to select, in the WinRAR files list, all files and folders which should be processed.

If you need to select only one file, just move the cursor to it and start an operation. There are several methods of file selection. As in other Windows applications you may press arrow keys or the left mouse button while holding Shift key to select a group of files. To select several separate items hold down the Ctrl key and then click each item you want. Press Ctrl+A or use the "Select all" command from File menu to select all the files and folders in the current folder.

All methods described above provide the standard non-persistent selection, which is canceled if you move the cursor. Though the standard methods are usually enough, sometimes it is more convenient to have persistent selection, allowing navigation in the current folder without removing the selection from previously marked files. WinRAR provides several keys for this:

Space, Ins | Select a file under the cursor and move the cursor down. To deselect a file selected using Space or Ins, press Space or Ins on the name again or use "Gray -" command.
Gray * (on numpad) | Invert the current selection
Gray + (on numpad) | Select files according to an entered wildcard mask
Gray - (on numpad) | Deselect files according to an entered wildcard mask

If no files are selected before starting extraction or testing, all archived files will be extracted or tested. This rule is valid only for test and extract operations.


Viewing files

When you perform a "View file" command, WinRAR shows the contents of the file under the cursor in the internal viewer window regardless of the file contents or configuration settings, but if you were to press Enter on a file name, several different results are possible. If the file under the cursor is an archive, WinRAR will open it and display its contents, otherwise further actions depend upon them settings specified in Viewer settings dialog. With this dialog you may force WinRAR to always use the internal viewer, to open the file in the external viewer, to call a program associated by Windows with this file type or to ask, each time before viewing the file, which action described above should be executed.

WinRAR can be used to view normal files, whether in an archive or not. If an external program is called to view an archived file, WinRAR unpacks this file to a temporary folder, passes its name to the external program and waits for the program to terminate. After this WinRAR tests the file modification time and if it was updated, offers to update this file in the archive and then deletes the temporary folder with the extracted file.

Note that the scheme described above is slightly modified, when Enter is pressed on an archived file, which has .exe extension. In this case WinRAR extracts not only this file, but the complete contents of the archive to the temporary folder and then runs the executable file. The following steps are similar to those described above: WinRAR waits for the executable to terminate, then tests the modification time of the extracted files and if changed or if new files were created, offers to update the archive. The temporary folder and it›s contents are then deleted. This method of processing .exe files allows programs to be run directly from an archive. For example, you may use it to install new programs without unpacking a distributive manually, simply enter to an archive and press Enter on setup.exe or install.exe program.


Name encoding

"Name encoding" menu can be opened from "Options" menu or with Ctrl+E keyboard shortcut. It allows to select encoding for archived file names. This selection affects archive browsing and extraction commands. Normally you should prefer "Default" item, enabling WinRAR to choose encoding based on Windows language settings and knowledge about typical archive format parameters. But if "Default" based result is not satisfactory, you can select other encodings from list of code pages provided in this menu.

User made selection is active until WinRAR is closed or another selection in this menu is done. If you wish to save the current menu selection permanently, choose "Save current" menu item. Do it only if you need to process a lot of archives utilizing the same code page, which cannot be recognized by WinRAR automatically, otherwise "Default" is the better choice. You can always restore "Default" by selecting it in the menu and choosing "Save current" menu item.

If archive contains Unicode file names and WinRAR can reliably detect it, WinRAR ignores a value selected in this menu and uses Unicode names. "Name encoding" menu is used if no Unicode names are available or if encoding cannot be detected for sure. While this menu is accessible when browsing both usual and archived files, a selected code page affects only archived file names and ignored for usual not archived files.


Options menu

Command "Settings…" of this menu activates the dialog containing the following WinRAR settings: General, Compression, Paths, File list, Viewer, Security and Integration. Select any of these topics for details. Keyboard shortcut for "Settings…" command is Ctrl+S.

You can export WinRAR settings to file and import them later using two appropriate commands of "Import and export" submenu. This file has "Settings.reg" name and by default it is placed in %APPDATA%\WinRAR folder, but you can select another folder in "Save WinRAR settings" or "Load WinRAR settings" dialogs. Restoring settings from the file can reduce time required to configure WinRAR if you re-installed Windows or need to move WinRAR to another computer. If WinRAR cannot find settings in Registry and Settings.reg file is present in WinRAR or %APPDATA%\WinRAR folders, it will be imported automatically. It might be necessary to restart WinRAR to apply some of imported settings. These commands are unavailable if WinRAR.ini file is used to store settings.

"Create WinRAR.ini file" command in "Import and export" submenu creates a new WinRAR.ini file and copies existing WinRAR settings from Registry to this file.

"File list" submenu contains two groups of options. "Flat folders view" command (Ctrl+H keyboard hot key) switches between the classic tree style view and flat view, when all archived files and folders are displayed in the same list. It is applicable only in the archive management mode. Another options group is "List view" and "Details" items, which control the file list appearance. "List view" switches the list to multicolumn mode with only file names displayed, when "Details" enables more informative view providing file sizes and other information.

"Folder tree" submenu allows to turn on or off the folder tree panel. You can configure it separately for file management ("Show disk folders" menu item) and archive management ("Show archive folders" item) modes. Another way to change the state of folder panel is Ctrl+T keyboard shortcut. Folder tree is convenient if you need to navigate in disk or archive folders quickly. You may change the width of folder tree by dragging its right border with the mouse.

"Themes" submenu contains the list of available WinRAR interface themes, "Organize themes…" command providing theme management functions and "Get more themes…" command loading themes web page.

"Name encoding" submenu permits to specify encoding for archived file names.

Another command of this menu is "View log…". It opens, in the internal viewer, the contents of rar.log, which exists in %APPDATA%\WinRAR folder. Note that you need to switch on "Log errors to file" in General settings dialog to force WinRAR to write errors to the log file. Use "Clear log" menu command to clear contents of the log file. Logging is available only in the registered version.


"Organize profiles" dialog

In this dialog you may edit some parameters of existing compression profiles or delete them. You cannot create a new profile here, methods of creating a new profile are described in the Compression profiles topic.

To edit profile parameters you need to put the cursor to a profile name, press the "Edit" button and set parameters in the Profile parameters dialog to desired values. Note that compression options stored in the profile cannot be changed, you may modify only a few profile related parameters like its name and default status. If you need to modify compression options, you need to create a new profile having the same name as the existing profile.

To delete a profile put the cursor to its name and press the "Delete" button.

Use "Move up" and "Move down" buttons to move a profile under the cursor in the list.

You may easily find the default profile in the list of profiles in this dialog, it has the small WinRAR icon ("books") to the left of its name.


"Organize themes" dialog

This dialog allows to manage WinRAR interface themes.

Press "Select" to activate the theme under the cursor. Use "Add" button to install a new theme file. "Delete" removes the theme under the cursor from the list and deletes all its files from the disk, so you will not be able to select it again.

"Apply to archive icons" option is global for all themes. If it is turned off, themes will modify only WinRAR graphics, but will not change RAR, ZIP and other archive icons. If it is on, both WinRAR graphics and archive icons are modified. Unlike other commands of this dialog, you need to press "OK" to apply a new value of "Apply to archive icons" option.


Organize passwords

"Organize passwords" dialog provides a way to save frequently used passwords and access them quickly later. It contains the list of password records stored by user. Normally password labels and archive masks are included to this list, but if no label is defined, the password text is displayed instead of label in "Label" column.

You can open "Organize passwords" from usual WinRAR password dialog. Just press "Organize passwords..." button, when you enter the default password or when WinRAR requests a password for encrypted file or archive.

Press "Add" button to add a new password record to the list, at position below the cursor. It will open Password information dialog, where you can specify the password text, label and archive mask. Read Password information dialog topic for more details about these options.

"Delete" button removes all selected password records. Use "Edit" button to modify parameters of password record under the cursor in Password information dialog. "Move up" and "Move down" change the position of all selected passwords in the list.

Press "Set master password" button, set the master password and then press "OK" in "Organize passwords" dialog if you wish to encrypt password records and protect them from unauthorized access. You will need to enter the master password in password prompt dialog to access these records after that. Once entered, the master password is valid until WinRAR is closed. Close WinRAR and open it again after specifying the master password if you wish to see how protection works. Enter an empty password to remove encryption from previously protected password records.

If master password is not set, saved passwords are stored in Registry in insecure format. So anybody having access to your computer may be able to retrieve them. While this password organizer feature can make working with passwords more convenient, you need to weigh security risks carefully. If information protected with password is sensitive and confidential, either avoid this feature or use it only if your computer is protected from unauthorized access or set the master password.

"Enable autocomplete" option allows the autocomplete feature in password dialog. It is enough to enter first letters of password or password label and if this password or label is found in the list of saved password, WinRAR will propose its full text. Autocomplete feature works only if "Show password" option in password dialog is enabled. If passwords are hidden, autocomplete is disabled. If label is defined for stored password, autocomplete will work only for label and not for password text.

When all modifications of password list in "Organize passwords" dialog are done, you need to press "OK" to save them.

You will be able to access saved passwords in password dialog, either using the drop down list associated with "Enter password" field or utilizing the autocomplete feature.


Paths settings

Paths settings dialog

To activate this dialog select "Settings…" command in Options menu and click on "Paths" tab. The dialog contents are described below.

Folder for temporary files

WinRAR uses this folder to create temporary files. If this field is blank, temporary files and folders will be created either in the current folder or in Windows temporary folder, depending on command type.

Initial state of this parameter is the standard Windows temporary folder. If you changed it and wish to revert it back to Windows temporary folder later, you can enter %temp% instead of folder name. WinRAR will expand it to Windows temporary folder name before creating temporary files.

Folder for temporary files/Use only for removable disks

For hard disks generally it is faster to create a temporary archive in the current folder, but for slow external disks it may be more efficient to create an archive on a hard disk and then copy it to external disk. To implement such behavior you should specify Folder for temporary files and turn on Use only for removable disks option.

Use only for removable disks option affects only those commands which involve archive modification. Other commands would not benefit from it, so they ignore the current disk type.

Start-up folder

You may enter here a folder, which will be opened each time when WinRAR is started. This option has meaning only if Restore last working folder on start-up option is switched off, otherwise last opened folder will be set.

Start-up folder/Restore last working folder on start-up

If this option is enabled, WinRAR will set last viewed folder, when executed without parameters.

Default folder for archives

If this field is not empty and an archive name does not contain a full path, an archive will be created in the specified folder. For example, if you entered the path to your Desktop, archives created by WinRAR will appear on the Desktop.

If this field is empty and an archive name does not contain a full path, archives will be created in the same folder as the files archived.

In the command line mode -cfg- switch disables most of WinRAR settings including the default folder for archives.

Default folder for extracted files

You may enter here a name of the folder, which will be used as a base to construct the destination folder in Extract without confirmation and Extract files to a specified folder commands. WinRAR builds the destination path in these extraction commands merging the default folder and an archive name. It may be convenient to enter Desktop path here, so you will immediately see unpacked data on your Desktop.

Unlike the default folder for archives, the default folder for extracted files is not used in the command line mode. Only "Extract files..." command is affected in context menus.

Append archive name to path

It controls if archive name is appended to the default folder or to folder proposed in extraction dialog, when constructing the destination path for extracted files.

Remove redundant folders from extraction path

This option works only in context menus, only for single selected archive with single folder and no files in archive root folder and only for "Extract to DestName\" command, where 'DestName' is a name of folder proposed by WinRAR and based on archive name. If all these conditions are met, this option removes the top level folder based on archive name from extraction path.

For example, if you have Pictures.rar containing all files in 'Samples' folder and if you unpack it with "Extract to Pictures\" context menu command, WinRAR will place files to "Pictures\Samples" if this option is off and to "Samples" if it is on. So it helps to save one click, avoiding necessity to open 'Pictures' folder, which contains nothing but 'Samples'.

This option introduces an additional delay in the beginning of extraction, because WinRAR needs to scan an archive and analyze its folder structure. Note that context menu still displays the archive based folder name even if it will be removed from path when extracting. Showing the correct folder already in context menu would introduce a potentially annoying delay between right clicking an archive and displaying the context menu.


"Profile parameters" dialog

In this dialog you can describe a new compression profile or edit parameters of an existing profile. It contains the following items:

Profile name

The profile name is a text string describing a profile. It may contain space characters, for example, the name "Create e-mail attachment" is valid. It is recommended to give sensible names to profiles, it simplifies their identification and management. This field is required and cannot be empty

Save archive name

If this option is on, the archive name specified in the field below is saved in the profile and will be restored when selecting this profile. If the option is off, an archive name will be proposed by WinRAR, as usual.

Save selected file names

If this option is on, the file names specified in the field below are saved in the profile. So if you select the profile later, WinRAR will compress files saved in the profile instead of files selected before activating the profile.

Initially this field contains names of files currently selected in WinRAR file list, but you may edit them or enter new names here. Folder names and wildcards are allowed. For example, you may create a profile containing "C:\" as the selected file name to backup the whole C: disk.

If this option is off, WinRAR will compress currently selected files.

Set profile as default

If a profile is marked as default, it will be automatically selected when opening the Archive name and parameters dialog before every archiving operation. It is convenient to create a default profile with your favorite compression options, so you do not need to set them every time. Only one profile can be set as default. If no profiles are marked as default, the archiving dialog will be initialized by the standard set of archiving options.

Some parameters of default compression profile are used not only when adding files to archive, but in other archive modification operations like deleting or renaming files. In this case WinRAR reads only those parameters, which are suitable for current operation. Extraction does not use any options from the default compression profile.

Immediate execution

If you select a profile having the Immediate execution parameter set on, the archiving operation will be started immediately, without possibility to modify compression settings or an archive name. It can be useful for routine compression operations, because you do not need to press the "OK" button every time after selecting such a profile.

Create shortcut on Desktop

This option is available only if Save selected file names option is enabled. If selected, WinRAR will create the icon with a profile name on Desktop, so you may activate a profile later simply clicking on this icon. For example, you may create a profile to backup your data and put its icon to the Desktop to simplify this operation.

Add to context menu

If this option is on, the profile name will be displayed in Explorer context menus allowing to activate a profile from them. If you also set the Immediate execution profile option, archiving will start immediately after choosing a profile in context menu. If Immediate execution is off, you will see Archive name and parameters dialog first. If Save archive name is on, WinRAR will use the saved name for new archive. If Save selected file names is on, both names stored in profile and names selected in Explorer will be added to archive.


Compression profiles

Compression profile is a set of different compression options, which can be quickly retrieved before starting an archiving operation. Instead of specifying an archive type, a volume size, a compression method and other options each time when you need to make a new archive, you may create several profiles storing options for your typical archiving operations and later select a required profile from the menu to restore all the options.

Compression profiles have user assigned names displayed in the profiles list. You may select a profile in Archive name and parameters dialog, just press the "Profiles" button, choose a required profile name in the drop down list and all options saved in the profile will be restored. WinRAR provides a few predefined profiles, for example, for creating an e-mail attachment and for files backup, but you may delete them if you wish.

There are two ways to create a new profile. You may open "Archive name and parameters" dialog, set the desired options, press the button "Profiles" and select the menu item "Save current settings to a new profile". Appearing Profile parameters dialog contains the profile name field, where you should enter a name of the new profile. A few profile options are also available in this dialog. The most important option is "Set profile as default". If you set it, the profile will be automatically selected before every archiving and some archive modification operations. Other options allow to save archive and file names, create a shortcut on Desktop and immediately run archiving after selecting a profile. Read the description of the Profile parameters dialog for detailed information about these options.

Another method of creating a new profile is to press "Create default" button in Compression settings dialog. In this case you only need to set desired archiving options in the displayed dialog and press "OK" button. The new profile created by this method becomes the default profile with the name "Default Profile". Unlike the first, this method does not provide access to advanced profile parameters such as storing archive and file names or creating a shortcut and it is convenient to create the default profile without additional questions. But if you need more flexibility, use the first method.

You cannot change compression options stored in a profile, but it is possible to change profile parameters, for example, its name or default status. To edit profile parameters or to delete existing profiles use the Organize profiles command, which is accessible from both the profiles menu in "Archive name and parameters" dialog and from the "Compression settings" dialog. Using this command you may assign a new profile as default or remove the default status from profile.

It is possible to store a password in profile, but please be aware that it is stored in Registry in insecure format. So anybody having access to your computer may be able to retrieve the stored password.


Password information dialog

"Password information" dialog is invoked after pressing "Add" or "Edit" buttons in "Organize passwords" dialog. So you can either specify the information about a new password or edit the already existing password record. Such information includes the password text, label, archive mask in "Select for archives" field and "Accept without confirmation" option.

"Password text" is the only mandatory field. It must contain the password to store.

You can use "Password label" field if you do not want real passwords to be visible in the password dialog. So you can specify some label for password here and then enter this label instead of real password every time when you need to set a password. WinRAR will replace such label by password automatically. Password dialog will inform you that you entered a label by displaying "Password label entered" message just above the password input field.

For example, you can define Fhtfl34Shu as the password text and home as the password label. After that you will be able to enter home instead of Fhtfl34Shu. This substitution works only in the password dialog. It does not affect the command line mode and -p[pwd] switch.

Password labels must be unique. They must not be the same as any other label or password. Labels are case insensitive, so home and Home are considered as the same label.

If you defined both the password text and label, the label will be displayed in the list in "Label" column in "Organize passwords" dialog. If only the password text is defined, it will be displayed in this list.

"Select for archives" field can include one or several archive names or masks (name only, without a path) separated by spaces. If archive name contains spaces, it must be enclosed in quotes. If unpacked archive name matches one of these masks, WinRAR will select a password defined in "Password text" automatically. If "Accept without confirmation" option is off, this password will be set as default in password dialog, but user will have a chance to change it. If "Accept without confirmation" option is on, the password will be accepted immediately.

For example, if you specify MailDGWT58 as password text and mymail*.rar mymail*.zip in "Select for archives" field, MailDGWT58 will be selected in password dialog automatically when unpacking mymail*.rar and mymail*.zip archives. This option works for unpacking only, not for archiving.

Please be aware that saved passwords are stored in Registry in the plain text unencrypted format. So anybody having access to your computer can view them. While this password organizer feature can make working with passwords more convenient, you need to weigh security risks carefully. If information protected with password is sensitive and confidential, either avoid this feature or use it only if your computer is protected from unauthorized access.


RAR 5.0 archive format

WinRAR 5.0 introduces a new verson of RAR archive format.

New features of RAR 5.0 format include:

  • Compression dictionary size up to 1 GB. When compressing big files, especially in solid mode, larger dictionary frequently allows to achieve a higher compression ratio.
  • Encryption based on AES-256 algorithm, which is theoretically stronger than RAR 4.x AES-128.
  • Recovery record using Reed-Solomon error correction codes with much higher resistance to multiple damages comparing to RAR 4.x recovery record.
  • Faster recovery volume operations. Maximum number of RAR+REV volumes in RAR 5.0 is 65535 instead of 255.
  • File times stored as Coordinated Universal Time (UTC) instead of RAR 4.x local time, making file exchange among several time zones more straightforward.
  • Optional BLAKE2sp checksums for file data. Unlike CRC32 checksum, it is practically impossible for BLAKE2 to have two different files with the same checksum value. So BLAKE2 can be used for file identification purpose.
  • Optional quick open information can be added to archive to provide a faster access to archive contents.
  • Multithreading support in decompression algorithm. Its speed benefit is more noticeable on large files with poorly compressible data or with BLAKE2 checksums.
  • Support for NTFS reparse points, symbolic links, hard links.
  • Possibility to store second and following copies of identical files as references to first copy of such file.
  • Complete Unicode awareness. File names and comments are stored in UTF-8 format.

Some obsolete or inefficient RAR 4.x features are not included in RAR 5.0 format:

  • Special algorithms including text compression, raw audio and true color compression, Itanium executable compression, cannot be used in RAR 5.0 archives. Those formats of raw audio and true color data, which were recognized by older RAR versions, become significantly less widespread. Text compression performance on modern multi-core CPUs is too low comparing to general compression. Even though these algorithms are not supported in RAR 5.0, latest WinRAR can decompress any 4.x RAR archives, including those using mentioned above algorithms. RAR 5.0 still includes Intel IA-32 executable and delta compression algorithms, which are efficient for modern data and hardware.
  • Creating old style volume names in archive.r00, archive.r01 format is not supported. Main purpose of these names was compatibility with MS DOS file system. But such naming convention does not work well with platforms like Windows, where file extensions are used to define file types and associations.

Older applications including WinRAR versions earlier than 5.0 are not able to recognize RAR 5.0 archives. So if you wish to be sure that archive can be decompressed by older software, you may prefer to select RAR 4.x archiving format. It can be done either in Archive name and parameters dialog or with -ma command line switch. Also RAR 4.x may be preferable if you need special text or multimedia compression algorithms or old style volume naming scheme.


RARFILES.LST - set file order in solid archives

Files in a solid archive are usually sorted by extension. It is possible to set an alternative file order using a special file, rarfiles.lst (this should be in the same folder as WinRAR.exe or in %APPDATA%\WinRAR folder). It is already provided in the WinRAR distributive, but may be customized for user files set. This is a plain text file, which defines the order of files when a solid archive is created. The file rarfiles.lst may contain file names, wildcards and a special entry - $default. The default entry defines the place in the order list for files not matched with other entries in rarfiles.lst.

Tips to provide improved compression and speed of operation:

  • Similar files should be grouped together in the archive if possible;
  • Frequently accessed files should be placed at the beginning.

Normally masks placed nearer to the top of list have a higher priority, but there is an exception from this rule. If rarfiles.lst contains such two masks that all files matched by one mask are also matched by another, that mask which matches a smaller subset of file names will have a higher priority regardless of its position in the list. For example, if you have *.cpp and f*.cpp masks, f*.cpp has a higher priority, so the position of 'filename.cpp' will be chosen according to 'f*.cpp', not '*.cpp'.

Example of rarfiles.lst

file_id.diz
readme.*
*.doc
*.txt
*.hlp
*.inf
*.exe
*.dll
$default
*.rar


RAR.ini file

If we wish to apply some command line switches by default, we can place them to rar.ini text file. Such file can be created either in the same folder as WinRAR.exe or in %APPDATA%\WinRAR folder.

This file can contain the following string:

switches=<any RAR switches separated by spaces>

It is also possible to specify separate switch sets for individual WinRAR commands using the following syntax:

switches_<command>=<any WinRAR switches separated by spaces>

Most of switches specified in rar.ini are used only in the command line mode. Some switches can be applicable both in shell and in command line modes.

Examples

  1. Apply -m5 -s switches in command line mode by default

switches=-m5 -s

  2. Use -m5 -s switches for "a" command, use -o+ for "x" command.

switches_a=-m5 -s

switches_x=-o+


RAR environment variable

Default switches may be added to the Windows environment variable, RAR, using the SET command. Most of switches specified in this variable are used only when WinRAR executed in the command line mode. Some switches can be applicable both in shell and in command line modes.

Example

Command:

SET RAR=-s -m5 -md64m

will force WinRAR to create solid archives using best compression and a 64 MB dictionary when executed in the command line mode.


RAR versus ZIP

WinRAR is able to create archives in two different formats: RAR and ZIP. Here is a comparison of these formats:

ZIP archives

The main advantage of ZIP format is its popularity. For example, most archives on Internet are ZIP archives. So if you are going to send an archive to somebody, but you are not sure that your addressee has WinRAR to extract the archive contents, it might be a good idea to use the ZIP format. Though, you may also send a self-extracting archive. Such archives are slightly larger, but can be extracted without external programs.

Another ZIP advantage is speed. ZIP archives are usually created faster than RAR.

RAR archives

Typically RAR format provides better compression than ZIP, especially in the solid mode. WinRAR multi-volume archives in RAR format allow more functions like self-extracting volumes.

RAR format has also a few important features missing in ZIP, such as the recovery record allowing to reconstruct damaged data and locking important archives to prevent their accidental modification.

Both RAR and ZIP formats are able to handle files of practically unlimited size (up to 8,589,934,591 GB).


Purchasing information

If you wish to use WinRAR and RAR after the evaluation period of 40 days, you need to purchase its license from one of the regional dealers. You may visit WinRAR home page for buying online or to read the latest sites list.

Upon receipt of your registration fee you will receive an email containing a registration key file corresponding to the user name string which you have chosen. Please specify a valid email address when buying the licence, as it will be used to send you the key file.

The registration email will also contain all necessary instructions, so please just follow them. Below, we provide a brief explanation of the typical registration procedure, but instructions in the email are more up to date than this file and should thus have a higher precedence.

If you use WinRAR, you will need to copy the registration key file (rarreg.key) to a WinRAR folder or to %APPDATA%\WinRAR folder folder. By default WinRAR folder is "C:\Program Files\WinRAR", but it can be changed by a user when installing WinRAR. You can also drag rarreg.key file and drop it to WinRAR window to register.

If the key is archived in a .rar or .zip file, please extract rarreg.key from the archive before copying it. If archive name is rarkey.rar, another way to install the key file is to open such archive in WinRAR and answer "Yes" to confirmation prompt.


Registry variables

In multi-user environment it may be important to disable access to some of WinRAR functions for security reasons. If you need to do it, create Registry key:

HKEY_LOCAL_MACHINE\Software\WinRAR\Policy

or

HKEY_CURRENT_USER\Software\WinRAR\Policy

Key in HKEY_LOCAL_MACHINE has a higher priority than in HKEY_CURRENT_USER.

This key may contain the following values:

Value name | Value type | Description
Menu | DWORD | If set to 0, disables WinRAR main menu.
Settings | DWORD | If set to 0, disables "Settings" dialog, "Settings/Import and export" submenu commands and toolbar context menu.
Password | DWORD | If set to 0, disables change of archiving password. It may help to avoid encrypting of important data.
OrgPasswords | DWORD | If set to 0, access to "Organize passwords" dialog is disabled. It does not disable access to passwords already stored in this dialog, so you may need to delete them before setting OrgPasswords variable.
Shutdown | DWORD | If set to 0, disables "When done" archiving option, so a user cannot shut down, sleep, hibernate or restart PC.
Benchmark | DWORD | If set to 0, disables "Benchmark" command. In multi-user environment "Benchmark" command might abuse shared computational resources.

It might be necessary to restart WinRAR after policy change. Policy key does not affect the console RAR (rar.exe file), so for better security in multi-user environment you may need to delete Rar.exe and keep only WinRAR.exe.

WinRAR uses a bit mask from NoDrives DWORD value in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer Registry key to hide one or more drives. Set it to 1 to hide A:, 2 for B:, 4 for C: and so on. Multiple drives are allowed. For example, decimal 12 (4 + 8) will hide C: and D: drives.

Also you can override the location of %APPDATA%\WinRAR folder, specifying a new path to WinRAR supplementary files in string value "AppData" of HKEY_CURRENT_USER\Software\WinRAR\Paths Registry key.


Security settings

Security settings dialog

To activate this dialog select "Settings…" command in Options menu and click on "Security" tab. The dialog contents are described below.

File types to exclude from extracting

If you enable this option, you can specify the list of potentially dangerous file masks in input field below. It is allowed to enter several masks separated by spaces. WinRAR will skip files matching any of these masks when extracting or opening archived files.

This option may help to protect users from infected email attachments. For example, if you enter:

*.scr *.pif *.exe

in this field, it will prohibit users to unpack, view and run .scr, .pif and .exe files with WinRAR.

Wipe temporary files

This group of options controls the delete mode for temporary files in WinRAR temporary folder generated when processing already existing archives. It involves external or internal viewer operations, executing an archived file or unpacking with the drag and drop.

Wipe temporary files/Never

If "Never" is selected, temporary files are removed using the standard system delete function and they can be recovered with special software sometimes. This is a fastest, but less secure way to deal with temporary files.

Wipe temporary files/Always

In "Always" mode, before deleting temporary files are overwritten by zero bytes to prevent their recovery. This is a noticeably slower and more secure approach.

Wipe temporary files/Encrypted only

If you selected "Encrypted only", temporary files are removed with the secure and slow wipe function if WinRAR identified an archive containing these files as encrypted. Otherwise a quick standard delete is applied.

Notes to "Wipe temporary files" options

  • Wipe operation is designed for usual hard disks, but may fail to overwrite the original file data on solid state disks, as result of SSD wear leveling technology and more complicated data addressing.
  • If temporary files are still in use, WinRAR may not delete them immediately. Instead, when you run WinRAR the next time, all temporary files older than one hour will be deleted or wiped out. The same happens if WinRAR cannot reliably detect if temporary files are still in use by external application.
  • This option works only with temporary files created after extraction operations. It does not work with different kind of temporary files like those created when modifying an archive. Such files are always removed with the standard quick delete.

Propose to select virus scanner

This option modifies behavior of Scan archive for viruses command. By default it is enabled, so WinRAR proposes to select virus scanner name and parameters every time when activating the virus scanning command. If you use only one antivirus, it is possible to skip the antivirus selection step by turning this option off.


"Advanced SFX options" dialog

This dialog can be activated from Convert archive to SFX command, by pressing "Advanced SFX options…" button. It allows to specify a number of self-extracting archive parameters like the default destination path, a window title and text. It automatically generates a script using script commands described in the topic dedicated to Windows SFX modules, so you do not need to learn the script language and enter the commands manually, just set the desires options.

Note that SFX parameters are applicable only to Windows GUI module and are not supported by console or non-Windows SFX.

SFX parameters in this dialog are combined to a few sub-dialogs described below:

  • SFX options: General
  • SFX options: Setup
  • SFX options: Modes
  • SFX options: Advanced
  • SFX options: Update
  • SFX options: Text and icon
  • SFX options: License
  • SFX options: Module


SFX commands: Delete

Delete=<filename>

Delete the specified file in the destination folder before extraction. Several Delete commands are allowed.

If a file specified in the Delete command is locked and cannot be deleted, SFX module will try to rename it to temporary name before extraction and delete after Windows reboot. Success of this operation depends on Windows version.

Example

Delete=winrar95.exe

Delete=rarlng.dll


SFX commands: License

License=<title of the license dialog>

{

license text1

license text2

…

}

Display the software license when starting SFX. User may either accept it and continue extraction or decline and quit.

License may be either in HTML or plain text format. In the latter case SFX module merges and reformats the specified text strings to fit them optimally into the dialog. So if you wish to start a new paragraph, you need to put the empty string before it.

Using HTML you may control colors, fonts and formatting of displayed text. Description of HTML syntax is available on The World Wide Web Consortium site. Also it is possible to use any web page editor program to prepare HTML text.

If text consists of several strings, SFX module considers ‹}› character as the end of text mark, so you should not use this character in your text at the first position in the string. If you need to use ‹}› in the beginning of string, insert the space before it.

Example

License=End user license agreement

{

All copyrights to RAR are exclusively owned by the author.

This program is shareware. Anyone may use this software during a test period.

Following this test period, you MUST register.

}


SFX options: Advanced

This dialog is a part of the "Advanced SFX options" dialog and includes the following settings:

Files to delete in the destination folder

SFX will try to delete the specified file or files in the destination folder before extraction. You may enter more than one file here, in this case file names have to be delimited with spaces.

If a file specified here is locked and cannot be deleted, SFX module will try to rename it to temporary name before extraction and delete after Windows reboot. Success of this operation depends on Windows version.

Corresponding SFX script command - Delete

Shortcuts

Create shortcuts to archived files after unpacking. Press "Add shortcut" button to define a new shortcut. You can see the description of shortcut parameters in Shortcut script command topic. Area below "Add shortcut" button contains already entered shortcuts and here you can edit them if needed.

Corresponding SFX script command - Shortcut

Request administrative access

Set this option if you wish to create SFX archive, which will request the administrative access when started in Windows Vista and later. This option does not change behavior of SFX archive in older Windows versions.

Corresponding command line switch is -iadm.


SFX options: General

This dialog is a part of the "Advanced SFX options" dialog and includes the following settings:

Path to extract

Set the default destination path for unpacked files. You may choose to create it in the user's "Program Files" folder, in the current folder or specify an absolute path here. In first two cases an entered path must not include the disk letter or leading backslash, in the third it must have one of them.

Corresponding SFX script command - Path

Path to extract/Save and restore paths

This option allows SFX to store the destination path entered by user to Registry and then restore it when SFX archive with the same Path to extract contents executed the next time. The original path value is placed to the list associated with the destination path input field, so a user may choose between previously entered and original paths.

This feature may be convenient when installing new versions or upgrades of some software in the same folder. It allows to change the proposed path to desired only once instead of retyping it every time.

It may be used only in combination with non-empty Path to extract field.

Corresponding SFX script command - SavePath

Save current settings as default

This button is displayed only if "Advanced SFX options" dialog is invoked from Convert archive to SFX command. It saves settings entered in all dialog sections. These saved settings are used only when converting an archive to SFX. Use the default compression profile for other archive modification commands.


SFX options: License

This dialog is a part of the "Advanced SFX options" dialog and includes the following settings:

Title of license window

Set the specified text as a title of the license window.

Corresponding SFX script command - License

License text

Display the specified text as software license when starting SFX. User may either accept it and continue extraction or decline and quit.

License may be either in HTML or plain text format. In the latter case SFX module merges and reformats the specified text strings to fit them optimally into the dialog. So if you wish to start a new paragraph, you need to put the empty string before it.

Using HTML you may control colors, fonts and formatting of displayed text. Description of HTML syntax is available on The World Wide Web Consortium site. Also it is possible to use any web page editor program to prepare HTML text.

Corresponding SFX script command - License.

Load text from file

Load contents of selected file as license text.


SFX options: Modes

This dialog is a part of the "Advanced SFX options" dialog and includes the following settings:

Temporary mode/Unpack to temporary folder

This option forces SFX to create a temporary folder, extract all files to it, start the program specified in Setup program/Run after extraction field and remove the temporary folder including all its contents after completing Setup program. The SFX automatically uses "Hide start dialog" silent mode (described below), when performing these operations, but you can override it by specifying "Hide all" silent mode. Temporary folder with unpacked files is set as the current folder for setup program.

You may also set two optional string parameters, which define a question and question title displayed before extraction. In such case the extraction is started only if a user selects "Yes" button.

If Unpack to temporary folder option is set, you should also specify Setup program. SFX ignores Path to extract parameter in this mode.

This option may fail to work with setup program, which terminates earlier than its child processes. Read TempMode command description for details.

Corresponding SFX script command - TempMode

Silent mode

By default SFX asks for confirmation to start extraction and allows to user to change the destination folder. If you set "Silent mode" to "Hide start dialog" this confirmation will be skipped. Select "Hide all" if you also wish to hide SFX license dialog and the extraction progress.

Corresponding SFX script command - Silent


SFX options: Module

This dialog is a part of the "Advanced SFX options" dialog and allows to choose a self-extracting module. Note that not all modules support advanced SFX options. They are supported by GUI RAR and ZIP modules (Default.SFX and Zip.SFX), but not by console RAR module (WinCon.SFX).


SFX options: Setup

This dialog is a part of the "Advanced SFX options" dialog and includes the following settings:

Setup program/Run after extraction

SFX will try to execute the specified program after successful extraction. The folder containing extracted files is set as the current before executing the program. If a program name contains spaces, it must be enclosed in quotes.

It is allowed to specify several setup programs here, one program per line. If you do not want to start all setup programs simultaneously, set "Wait and return exit code" option.

Read notes to Setup topic for some additional details.

Corresponding SFX script command - Setup

Setup program/Run before extraction

SFX will try to execute the specified program before starting extraction, so this program must already exist on disk. The destination folder is set as the current before executing the program. If a program name contains spaces, it must be enclosed in quotes. You may use this command, for example, to remove a previous version of program, when installing a new version over the old one.

It is allowed to specify several programs here, one program per line. SFX waits for termination of every such program before starting next program or continuing with extraction.

Corresponding SFX script command - Presetup

Setup program/Wait and return exit code

If this option is on, SFX waits for termination of every setup program specified to start after extraction and returns the exit code of such program as the exit code of SFX executable. If SFX failed to run a setup program because of some error, it returns its own error codes, which are the same as WinRAR exit codes. Returned values are adjusted according to "Exit code adjustment" parameter.

Setup program/Exit code adjustment

Since a setup program and SFX module can use same exit code values to define various events, "Exit code adjustment" parameter allows to map codes to different areas. If it contains a positive integer, it is added to setup program codes while returning SFX own codes as is. For negative integer its absolute value is added to SFX own codes while returning setup program codes as is. Use 0 to return both setup and SFX codes as is.

You can read SetupCode topic for additional details.

Corresponding SFX script command - SetupCode


SFX options: Text and icon

This dialog is a part of the "Advanced SFX options" dialog and includes the following settings:

Title of SFX window

Set the specified text as a title of the SFX window.

Corresponding SFX script command - Title

Text to display in SFX window

Add the specified plain text or HTML strings to the text output window of SFX module.

In case of plain text contents SFX module merges and reformats the specified text strings to fit them optimally into the dialog. So if you wish to start a new paragraph, you need to put the empty string before it.

Using HTML you may control colors, fonts and formatting of displayed text. Description of HTML syntax is available on The World Wide Web Consortium site. Also it is possible to use any web page editor program to prepare HTML text.

Corresponding SFX script command - Text

Load text from file

Load contents of selected file as SFX window text.

Load SFX logo from the file

Specify a bitmap image (*.png) file to display as logo in the created or updated SFX archive.

Size of default SFX logo is 93x302 pixels. It is recommended to use bitmaps of same size or smaller.

You must not compress SFX module by any third party executable compressors if you are going to use this option.

Corresponding command line switch is -iimg.

Load SFX icon from the file

Replace the standard SFX icon by contained in the proposed .ico file. You must not compress SFX module by any third party executable compressors if you are going to use this option.

Corresponding command line switch is -iicon.


SFX options: Update

This dialog is a part of the "Advanced SFX options" dialog and includes the following settings:

Update mode/Extract and replace files

Extract all archived files regardless of file time.

Update mode/Extract and update files

Extract those files, which copies either not present in the target folder or older than extracting files.

Corresponding SFX script command - Update=U

Update mode/Freshen existing files only

Extract only those files, which exist in the target folder and older than the corresponding file in the archive. If a file not present on disk, it will be skipped.

Corresponding SFX script command - Update=F

Overwrite mode/Ask before overwrite (default)

Prompts before overwriting a file.

Overwrite mode/Overwrite all files

Files are overwritten without any prompt.

Corresponding SFX script command - Overwrite=1

Overwrite mode/Skip existing files

Do not overwrite files which are already exist.

Corresponding SFX script command - Overwrite=2


SFX commands: Overwrite

Overwrite=[n]

If 'n' is 0, the user will be asked before overwriting existing files. It is the default behavior and the Overwrite command does not need to be specified for it. If 'n' is absent or equal to '1', all files are overwritten without a confirmation. If 'n' is equal to '2', all existing files will not be overwritten.

Example

Overwrite=1


SFX commands: Path

Path=<path>

Set the default destination path for unpacked files. Absolute paths started from '<drive letter>:' are used without changes. If <path> contains only a name, it will be appended to the path of the "Program Files" folder. If you wish to disable such behavior and create the specified folder in the current folder, start <path> definition from '.\' characters.

Examples

  1. set the default path to "Program Files\Calc 3.05":

Path=Calc 3.05

  2. set the default path to "C:\Calc":

Path=C:\Calc

  3. set "Calc" folder without any preceding text as the default path:

Path=.\Calc

Notes

  1. It is allowed to specify system environment variables in %varname% format in Path. For example, "Path=%APPDATA%\MyApp". SFX module expands them automatically. Dynamic environment variables such as %date% or %random%, are not expanded.
  2. SFX module sets sfxstime environment variable, which contains the module start time in "YYYY-MM-DD-HH-MM-SS-ms" format. You can specify it in Path command if you need to generate a time based unique installation path, such as "Path=MyApp-%sfxstime%"


SFX commands: Presetup

Presetup=<program>

SFX will try to execute <program> before starting extraction, so <program> must already exist on disk. The destination folder is set as the current before executing <program>. You may use this command, for example, to remove a previous version of program, when installing a new version over the old one. If a program name contains spaces, it must be enclosed in quotes.

Example

Presetup=uninstall.exe /clean

Notes

  1. SFX module displays "Extract" button instead of "Install" if no Setup or Presetup commands are present in the archive comment. If you prefer "Install" button, but do not need to execute any setup programs, you can add Setup command without any parameters.


SFX commands: script sample

The script below sets the dialog title to "Calculator 3.05", changes text displayed in the dialog, sets the default extraction path to "Program Files\Calculator", enables overwriting of the already existing files and executes setup.exe after extracting all files.

Title=Calculator 3.05

Text

{

Calculator is shareware. Anyone may use this

software during a test period of 40 days.

Following this test period or less, if you wish

to continue to use Calculator, you MUST register.

}

Path=Calculator

Overwrite=1

Setup=setup.exe


SFX commands: SavePath

SavePath

This command allows SFX to store the destination path entered by user to Registry and then restore it when SFX archive with the same parameter of Path command executed the next time. The original value of Path command is placed to the list associated with the destination path input field, so a user may choose between previously entered and original paths.

This feature may be convenient when installing new versions or upgrades of some software in the same folder. It allows to change the proposed path to desired only once instead of retyping it every time.

SavePath command may be used only in combination with Path command.

Example

Path=Calc 3.05

SavePath


SFX commands: Setup

Setup=<program>

SFX will try to execute <program> after successful extraction. The folder containing extracted files is set as the current before executing <program>. If a program name contains spaces, it must be enclosed in quotes.

Example

Setup=setup.exe

Notes

  1. If you have problems to use SFX to run InstallShield setup.exe, try to execute "setup.exe /SMS" instead of simple "setup.exe". This switch allows SFX to detect termination of the InstallShield setup program.
  2. If application specified in Setup command does not have any parameters, you can use -sp<par> SFX command line switch to pass optional parameters to this application.
  3. SFX module sets sfxname, sfxcmd and sfxpar environment variables before running the setup program. sfxname variable contains a name of SFX archive. sfxcmd variable contains the complete command line received by SFX module. First parameter of this command line is SFX module name. sfxpar contains command line parameters only, without SFX module name. Setup program can read these variables if it needs such information. Also you can specify an expanded %variable% as a parameter, like "Setup=setup.exe %sfxpar%".
  4. SFX module displays "Extract" button instead of "Install" if no Setup or Presetup commands are present in the archive comment. If you prefer "Install" button, but do not need to execute any setup programs, you can add Setup=<> command. Or if you configure SFX archive through SFX options GUI dialog, just specify <> as setup program name. SFX module does not attempt to run a program with such name, but changes the button text.


SFX commands: SetupCode

SetupCode[=Param]

If this command is present, SFX archive waits until a program specified in Setup or Presetup command finishes and uses its exit code as the exit code of SFX executable.

If SFX failed to run a setup program because of some error, it returns its own error codes, which are the same as WinRAR exit codes.

Since a setup program and SFX module can use same exit code values to define various events, this command allows to map codes to different areas.

If Param is a positive integer, it is added to setup program codes. SFX own codes are returned as is.

If Param is a negative integer, its absolute value is added to SFX own codes. Setup program codes are returned as is.

If Param is 0, both SFX and setup codes are returned as is.

If param is omitted, 1000 is assumed, so "SetupCode" and "SetupCode=1000" are equal.

Let's suppose we have "SetupCode=1000" command. If SFX failed to run a setup program, SFX will return its own error code less than 1000, such as 3 for checksum error. If SFX successfully started a setup program and it is completed with zero code, SFX will return 1000. If setup program returned 10, SFX will return 1010.

If we have the negative integer "SetupCode=-1000" command, SFX will return 1003 in case of checksum error, 0 for setup program returning 0 and 10 for setup returning 10.

If several Setup and Presetup commands are used and SetupCode is present, SFX will wait for every Setup and Presetup command and return a largest code returned by setup applications.

Example

Setup=setup.exe

SetupCode


SFX commands: Shortcut

Shortcut=<DestType>,<SrcName>,<DestFolder>,<Description>,<ShortcutName>,<ShortcutIcon>

Create a shortcut to unpacked file.

DestType is one character wide field, which can have the following values:

D | Create a shortcut on Desktop
P | Create a shortcut in Start Menu/Programs
T | Create a shortcut in Startup folder

SrcName is a name of archived file. If it is an executable, you can specify additional parameters after the name enclosed in quote marks.

DestFolder is a folder to create a shortcut in. If it does not exist, it will be created by SFX archive.

Description is a text string describing a shortcut.

ShortcutName is a name of .lnk (shortcut) file created by SFX.

ShortcutIcon is a name of icon file associated with shortcut. If you omit this parameter, the default icon will be used. If icon file name does not contain the full path, SFX archive will search the icon file in folder containing unpacked files.

All parameters are separated by commas. If you need to put a comma character inside of parameter, enclose the whole parameter to quotes. Repeat quotes twice if you need to insert a quote mark into string. Only DestType and SrcName are required, other parameters are optional and can be omitted or left empty.

Examples

1. Create a shortcut in folder WinRAR on Desktop to archived file winrar.exe with the description "WinRAR executable file", name "WinRAR archiver" and icon winrar.ico:

Shortcut=D, winrar.exe, WinRAR, "WinRAR executable file", "WinRAR archiver", winrar.ico

2. Provide additional parameters for rar.exe, omit DestFolder and ShortcutIcon parameters:

Shortcut=D, "rar.exe" a -ag c:\mydata\backup\daily c:\mydata\files, , Daily backup, Backup


SFX commands: Silent

Silent[=Param]

Start extraction without displaying the start dialog.

Param can be either 1 or 2.

If Param is 1, the start dialog is completely hidden, including the progress bar and file names. Also in this mode SFX does not display the license dialog.

If Param is omitted or equal to 2, the confirmation to start extracting is skipped, but users still see the archive extraction progress.

Example

Silent=2


SFX commands: TempMode

TempMode=[Question][,Title]

This command forces SFX to create a temporary folder, extract all files to it, start the program specified in Setup command and remove the temporary folder including all its contents after completing the Setup program. The SFX automatically sets the silent mode to 2 to skip the start dialog when performing these operations, but you can override it by specifying Silent command with another parameter. Temporary folder with unpacked files is set as the current folder for setup program.

TempMode command may have the optional string parameter, which is used to define a question and question title displayed before extraction. In such case the extraction is started only if user selects "Yes" button.

If TempMode command is present, a script should also have Setup command. Path command is ignored in this mode.

In TempMode SFX needs to detect the termination of setup program to delete temporary files. Such approach works correctly if setup program is not terminated before installation is done. But sometimes the setup program starts a child process and terminates, expecting a child process to complete installation. In such case SFX deletes temporary files immediately after detecting that main setup application is finished, resulting in malfunctioning child process. So TempMode works correctly only with those setup programs, which do not start another processes or, at least, are not terminated until all child processes are finished.

Examples

a) TempMode

b) TempMode=Do you wish to continue installation of Calculator 3.05?, Calculator setup


SFX commands: Text

This command supports two versions of the syntax:

Text=<string>

Text

{

string1

string2

…

}

It adds the specified plain text or HTML strings to the text output window of SFX module. When SFX module encounters Text command the first time, it resets the default contents of this window before adding <string>. Following commands append <string> to the already existing text.

Depending on the used syntax this command may add either a single string or several strings at once.

In case of plain text contents SFX module merges and reformats the specified text strings to fit them optimally into the dialog. So if you wish to start a new paragraph, you need to put the empty string before it.

Using HTML you may control colors, fonts and formatting of displayed text. Description of HTML syntax is available on The World Wide Web Consortium site. Also it is possible to use any web page editor program to prepare HTML text.

If text consists of several strings, SFX module considers ‹}› character as the end of text mark, so you should not use this character in your text at the first position in the string. If you need to use ‹}› in the beginning of string, insert the space before it.

Examples

  1. add the single string to the dialog window

Text=Here is my new program

  2. add the specified text to the dialog window

Text

{

Most interesting features of this program are:

- support of the Windows Clipboard;

- processing of files up to 10KB size each;

}


SFX commands: Title

Title=<title>

Set a title of SFX window.

Example

Title=Calculator, version 3.05


SFX commands: Update

Update=<c>

<c> parameter can be either U or F character.

If <c> is U, SFX module will extract files, which copies are not already present on the disk, and files newer than their copies on the disk.

If <c> is F, SFX module will extract only those files, which are newer than their copies on the disk. If copy of extracted file is not present in destination folder, file will not be extracted in F mode.

Example

Update=U


File management and archive management modes

WinRAR shell may be in one of two basic states: file management mode or archive management mode.

In the file management mode, a list of files and folders from the current working folder is displayed. You may select these files and folders in the usual Windows fashion, with a mouse or keyboard, and perform different file operations such as archiving or deleting. Also in this mode it is possible to perform test and extract operations with groups of archives.

In the archive management mode, the list of archived files and folders from the currently opened archive is displayed. You also may select files and folders and perform archive specific operations such as extracting, testing or commenting.

In either mode you may change the current folder (real or archived). Press BS, Ctrl+PgUp or double-click on the folder with ".." name to go to the parent disk or archive folder. The same action will close an archive and return WinRAR to file management mode, if you are viewing the archive root folder. Press Enter, Ctrl+PgDn or double-click on any other folder to enter to it. The same action applied to an archive name will open this archive. Ctrl+\ sets the root disk folder or folder containing an archive as the current.

To enter WinRAR file management mode, start WinRAR by simply double-clicking on the WinRAR icon or run WinRAR from the command line with no parameters.

To enter WinRAR archive management mode, start WinRAR in the file management mode, place the cursor on the desired archive and press Enter or use the "Open archive" command of File menu. Or simply double-click on the archive name in Windows shell (Explorer or Desktop) to open it in WinRAR, but for this to take effect, WinRAR must have been associated with archives during installation (it is the default installation option). You also may associate WinRAR with archives after installation using Integration settings dialog. And finally, it is also possible to enter directly to the desired archive from the command line, if the archive name is passed to WinRAR in the command line as a single parameter.


Switch -AC - clear "Archive" attribute

This switch is designed for backup purposes. If it is used when archiving, "Archive" file attribute will be cleared for successfully compressed files. If used when extracting, WinRAR will clear "Archive" attribute for extracted files. This switch does not affect folder attributes.


Switch -AD[1]- append archive name

This option may be useful when unpacking a group of archives. By default WinRAR places files from all archives in the same folder, but this switch creates a separate folder for files unpacked from each archive. These separate folders are created in destination folder for -ad switch and in each archive folder for -ad1 switch. Destination folder parameter is ignored for -ad1 switch.

Examples

  1. For every unpacked archive WinRAR will create subfolders below 'data'

WinRAR x -ad *.rar data\

  2. WinRAR will recursively scan 'arc' folder for *.rar archives and create subfolders in each archive folder

WinRAR x -r -ad1 arc\*.rar


Switch -AF<type> - specify archive format

This switch allows to define a type of new archive in WinRAR command line. <Type> parameter can be 'rar' or 'zip'.

For example, 'winrar a -afzip arc' will create arc.zip archive.

This switch is supported only by WinRAR. Console RAR is not able to create ZIP archives.


Switch -AG[format] - generate archive name using the current date and time

Appends the current date string to an archive name when creating or processing an archive. Useful for daily backups.

Format of the appending string is defined by the optional format parameter or by "YYYYMMDDHHMMSS" if this parameter is absent. The format string may include the following characters:

Y | year
M | month
MMM | month as text string (Jan, Feb, etc.)
W | a week number (a week starts with Monday)
A | day of week (Monday is 1, Sunday is 7)
D | day of month
E | day of year
H | hours
M | minutes (treated as minutes if encountered after hours)
I | minutes (treated as minutes regardless of hours position)
S | seconds
N | archive number (numeric value starting from 1). When archiving, WinRAR searches for already existing archive with generated name and if found, increments the archive number until generating an unused name. 'N' format character is not supported when creating volumes. When performing non-archiving operations like extracting, WinRAR selects the existing archive preceding the first unused name or sets N to 1 if no such archive exists.

Each of format string characters listed above represents only one character added to archive name. For example, use WW for two digit week number or YYYY to define the four digit year.

If the first character in the format string is '+', positions of the date string and base archive name are exchanged, so a date will precede an archive name.

If the first character in the format string is 'F', the rest of string specifies the default format string for -ag switch. Such -agf switch has a practical value only if placed to rar.ini file or RAR environment variable. For example, if we set RAR environment variable to -agfYYYY-MMM-DD, we can use -ag without a parameter with YYYY-MMM-DD format string assumed.

The format string may contain optional text enclosed in '{' and '}' characters. This text is inserted into archive name.

All other characters are added to an archive name without changes.

If you need to process an already existing archive, be careful with -ag switch. Depending on the format string and time passed since previous -ag use, generated and existing archive names may mismatch. In this case WinRAR will create or open a new archive instead of processing the already existing one. You may use -log switch to write the generated archive name to a file and then read it from file for further processing.

Examples

  1. use the default YYYYMMDDHHMMSS format

WinRAR a -ag backup

  2. use DD-MMM-YY format

WinRAR t -agDD-MMM-YY backup

  3. use YYYYMMDDHHMM format, place date before 'backup'

WinRAR a -ag+YYYYMMDDHHMM backup

  4. use YYYY-WW-A format, include fields description

WinRAR a -agYYYY{year}-WW{week}-A{wday} backup

  5. use YYYYMMDD and the archive number. It allows to generate unique names even when YYYYMMDD format mask used more than once in the same day

WinRAR a -agYYYYMMDD-NN backup


Switch -AI - ignore file attributes

If this switch is used when extracting, WinRAR does not set general file attributes stored in archive to extracted files. This switch preserves attributes assigned by operating system to a newly created file. It affects archive, system, hidden and read-only attributes.

If this switch is used when archiving, predefined values, typical for file and folder, are stored instead of actual attributes.

Supported only for RAR and ZIP formats when extracting and only for RAR format when archiving.


Switch -AO - add files with "Archive" attribute set

This switch is designed for backup purposes. If it is used when archiving, only files with "Archive" file attribute will be added to archive. This switch does not affect folders, so all matching folders are added regardless of their attributes. You can also specify -ed switch if you prefer to omit all folder records.

Example

add all disk C: files with "Archive" attribute set to the 'f:backup' and clear files "Archive" attribute

WinRAR a -r -ac -ao f:backup c:\*.*


Switch -AP - set path inside archive

Switch -AP<path> - set path inside archive

The path defined using this switch is merged to file names when adding files to an archive and removed from file names when extracting.

For example, if you wish to add the file readme.txt to the folder DOCS\ENG of archive release, you may run:

WinRAR a -apDOCS\ENG release readme.txt

or to extract ENG to the current folder:

WinRAR x -apDOCS release DOCS\ENG\*.*

Available for RAR and ZIP formats only.


Switch -AS - synchronize archive contents

If this switch is used when archiving, those archived files which are not present in the list of the currently added files, will be deleted from the archive. It is convenient to use this switch in combination with -u to synchronize contents of archive and archiving folder.

For example, after the command:

WinRAR a -u -as backup sources\*.cpp

the archive backup.rar will contain only *.cpp files from folder sources, all other files will be deleted from the archive. It looks similar to creating a new archive, but with one important exception: if no files are modified since the last backup, the operation is performed much faster than the creation of a new archive.


Switch -@[+] - disable [enable] file lists

WinRAR treats command line parameters starting from '@' character as file lists. So by default, WinRAR attempts to read 'filename' filelist, when encountering '@filename' parameter. But if '@filename' file exists, WinRAR treats the parameter as '@filename' file instead of reading the file list.

Switch -@[+] allows to avoid this ambiguity and strictly define how to handle parameters starting from '@' character.

If you specify -@, all such parameters found after this switch will be considered as file names, not file lists.

If you specify -@+, all such parameters found after this switch will be considered as file lists, not file names.

This switch does not affect processing parameters located before it.

Example

test the archived file '@home'

WinRAR t -@ notes.rar @home


Switch -CFG- - ignore default profile and environment variable

This switch instructs WinRAR to ignore the default compression profile options, RAR environment variable, default folder for archives, "Select for archives" fields in Organize passwords dialog and some other saved settings.


Switch -CL - convert file names to lower case

When this switch is used, names of all files extracted from an archive, added to an archive, modified or update within an archive, will be converted to lower case. This is sometimes useful when moving an archive from a case insensitive OS to a case sensitive OS, for example extracting under Unix, an archive created under DOS.

Example

extract all files from port.rar converting names to lower case

WinRAR x -cl port


Switch -CP<name> - select a compression profile

Using this switch you can load settings stored in WinRAR compression profile. You need to specify a profile name as switch parameter. If profile stores selected file names, WinRAR will compress both files specified in the command line and stored in profile. If profile contains an archive name, it will be used in archiving and you should not specify another archive name in command line.

Profile name is the case sensitive. Specify it using the same case as when storing a profile.

Example

Archive *.txt files using settings from "My Texts" compression profile

WinRAR a "-cpMy Texts" texts *.txt


Switch -CU - convert file names to upper case

When this switch is used, the names of all files extracted from an archive, added to an archive, modified or update within an archive, will be converted to upper case.

Example

extract all files from port.rar converting names to upper case

WinRAR x -cu port


Switch -DF - delete files after archiving

Move files to archive. This switch in combination with the command a performs the same action as the command m.


Switch -DH - open shared files

Allows to process files opened by other applications for writing.

This switch helps if an application allowed read access to file, but if all types of file access are prohibited, the file open operation will still fail.

This switch could be dangerous, because it allows to archive a file, which at the same time is modified by another application, so use it carefully.

If -dh is not specified, processing of shared files depends on the option "Open shared files" in the default compression profile.

Example

WinRAR a -dh dbf *.dbf


Switch -DR - delete files to Recycle Bin

Delete files after archiving and place them to Recycle Bin.


Switch -DS - do not sort archiving files

This switch is meaningful only for solid RAR archives. The compression ratio in solid archives is dependent upon the file order. By default WinRAR sorts files, to be added to a solid archive, by extension. You may disable this sorting using the -ds switch and try to set a more optimal file order. Generally files with similar data should be placed closely together.

Example

WinRAR a -s -ds tools *.com *.exe *.doc *.txt *.*

Files will be added in the following order: *.com, *.exe, *.doc, *.txt, all other file types.

Note

file rarfiles.lst also may be used to define the order of files in solid archives


Switch -DW - wipe files after archiving

Delete files after archiving. Before deleting file data are overwritten by zero bytes to prevent recovery of deleted files, file is truncated and renamed to temporary name.

Please be aware that such approach is designed for usual hard disks, but may fail to overwrite the original file data on solid state disks, as result of SSD wear leveling technology and more complicated data addressing.


Switch -E[+]<attr> - set file exclude and include attributes

Specifies file exclude or include attributes mask. <attr> is a number in the decimal, octal (with leading '0') or hex (with leading '0x') format.

By default, without '+' sign before <attr>, this switch defines the exclude mask. So if result of bitwise AND between <attr> and file attributes is nonzero, file would not be processed.

If '+' sign is present, it specifies the include mask. Only those files which have at least one attribute specified in the mask will be processed.

In the Windows version is also possible to use symbols D, S, H, A and R instead of a digital mask to denote folders and files with system, hidden, archive and read-only attributes. The order in which the attributes are given is not significant.

It is allowed to specify both -e<attr> and -e+<attr> in the same command line.

Examples

  1. archive only folder names without their contents

WinRAR a -r -e+d folders

  2. do not compress system and hidden files:

WinRAR a -esh files

  3. do not extract read-only files:

WinRAR x -er files


Switch -ED - do not add empty folders

This switch indicates that folder records are not to be stored in the created archive. When extracting such archives, WinRAR creates non-empty folders based on paths of files contained in them. Information about empty folders is lost. All attributes of non-empty folders except a name (access rights, streams, etc.) will be lost as well, so use this switch only if you do not need to preserve such information.

If -ed is used with m command or -df switch, WinRAR will not remove empty folders.


Switch -EN - do not add "end of archive" block

Not supported for RAR 5.0 archives.

By default, WinRAR adds an "end of archive" block to the end of a new or updated archive. It allows to skip external data like digital signatures safely, but in some special cases it may be useful to disable this feature. For example, if an archive is transferred between two systems via an unreliable link and at the same time a sender adds new files to it, it may be important to be sure that the already received file part will not be modified on the other end between transfer sessions.

This switch cannot be used with volumes, because the end of archive block contains information important for correct volume processing.


Switch -EP - exclude paths from names

With this switch, files are added to an archive without including the path information. This could result in multiple files with the same name existing in the archive.

If used when extracting, archived paths are ignored for extracted files, so all files are created in the same destination folder.

Example

archive without paths all *.bas files from the current disk

WinRAR a -r -ep bsources \*.bas


Switch -EP1 - exclude base folder from names

Do not store or extract the path entered in the command line.

Examples

  1. add all files and folders from 'tmp' folder to archive 'test', but exclude 'tmp\' from archived names path

WinRAR a -ep1 -r test tmp\*

 This is an equivalent to commands:

cd tmp

WinRAR a -r ..\test

cd ..

  2. extract files matching images\* mask to dest\ folder, but remove 'images\' from paths of created files

WinRAR x -ep1 data images\* dest\


Switch -EP2 - expand paths to full

Store full file paths (except a drive letter and leading backslash) when archiving.


Switch -EP3 - expand paths to full including the drive letter

This switch stores full file paths including the drive letter if used when archiving. Drive separators (colons) are replaced by underscore characters.

If you use -ep3 when extracting, it will change underscores back to colons and create unpacked files in their original folders and disks. If the user also specified a destination path, it will be ignored.

It also converts UNC paths from \\server\share to __server\share when archiving and restores them to the original state when extracting.

This switch can help to backup several disks to the same archive. For example, you may run:

WinRAR a -ep3 -r backup.rar c:\ d:\ e:\

to create backup and:

WinRAR x -ep3 backup.rar

to restore it.

But be cautious and use -ep3 only if you are sure that extracting archive does not contain any malicious files. In other words, use it if you have created an archive yourself or completely trust its author. This switch allows to overwrite any file in any location on your computer including important system files and should normally be used only for the purpose of backup and restore.


Switch -F - freshen files

May be used with archive extraction or creation. The command string "a -f" is an equivalent to the command f. You could also use the switch "-f" with the command m.

If the switch "-f" is used with the commands x or e, then only old files will be replaced with new versions extracted from the archive. Archived files, without a matching unpacked file, will not be extracted.

The shell mode equivalent of this switch is the "Fresh existing files only" option in the Archive name and parameters dialog and "Fresh existing files" option in the Extraction path and options dialog.

Supported only for RAR and ZIP formats.


Switch -HP[pwd] - encrypt both file data and headers

This switch is similar to -p[p], but switch -p encrypts only file data and leaves other information like file names visible. This switch encrypts all sensitive archive areas including file data, file names, sizes, attributes, comments and other blocks, so it provides a higher security level.

Without a password it is impossible to view even the list of files in archive encrypted with -hp.

Example

add the file report.txt to the encrypted archive secret.rar using the password 'fGzq5yKw'

WinRAR a -hpfGzq5yKw secret report.txt


Switch -HT[B|C] - select hash type [BLAKE2,CRC32] for file checksum

File data integrity in RAR archive is protected by checksums calculated and stored for every archived file.

By default, WinRAR uses CRC32 function to calculate the checksum. RAR 5.0 archive format also allows to select BLAKE2 hash function instead of CRC32.

Specify -htb switch for BLAKE2 hash and -htc for CRC32 function. Since CRC32 is the default algorithm, you may need -htc only to override -htb mode in WinRAR configuration.

CRC32 output is 32 bit length. While CRC32 properties are suitable to detect most of unintentional data errors, it is not reliable enough to verify file data identity. In other words, if two files have the same CRC32, it does not guarantee that file contents is the same.

BLAKE2 output is 256 bit. Being a cryptographically strong hash function, it practically guarantees that if two files have the same value of BLAKE2, their contents is the same. BLAKE2 error detection property is also more reliable than in shorter CRC32.

Since BLAKE2 output is longer, resulting archive is a slightly larger for -htb switch.

If archive headers are unencrypted (no switch -hp), checksums for encrypted RAR 5.0 files are modified using a special password dependent algorithm, to make impossible guessing file contents based on checksums. Do not expect encrypted file checksums to match usual CRC32 and BLAKE2 values.

This switch is supported only by RAR 5.0 format, so you need to use -ma switch with it.

-htb is the command line equivalent of Use BLAKE2 file checksum option in "Archive name and parameters" dialog.

Example

add *.lst to lists.rar using BLAKE2 for file checksums

WinRAR a -ma -htb lists.rar *.lst


Switch -IADM - request administrative access for SFX archive

Use -IADM if you wish to create SFX archive, which will request the administrative access when started in Windows Vista and later. This switch does not change behavior of SFX archive in older Windows versions.

This switch is the command line equivalent of "Request administrative access" option in SFX options: Advanced dialog.

Example

WinRAR a -sfx -iadm install.exe c:\data


Switch -IBCK - run WinRAR in background

Minimize WinRAR to tray when starting an archive processing operation.

Shell mode equivalent of this switch are "Background archiving" option in Archive name and parameters dialog and "Background extraction" option in extraction dialog.


Switch -IEML[.][addr] - send archive by email

Attach an archive created or updated by the add command to email message. You need to have a MAPI compliant email client to use this switch (most modern email programs support MAPI interface).

You may enter a destination email address directly in the switch or leave it blank. In the latter case you will be asked for it by your email program. It is possible to specify several addresses separated by commas or semicolons.

If you append a dot character to -ieml, an archive will be deleted after it was successfully attached to an email.

If the switch is used when creating a multivolume archive, every volume is attached to a separate email message.


Switch -IICON<name> - specify SFX icon

Specify an icon to use in the created or updated SFX archive. The <name> parameter is a name of .ico file. You must not compress SFX module by any third party executable compressors if you are going to use -iicon.

This switch is the command line equivalent of "Load SFX icon from the file" option in SFX options: Text and icon dialog.

Examples

  1. add contents of c:\myfiles folder to setup.exe SFX archive and use c:\myicons\ver1.ico as SFX icon

WinRAR a -sfx -iiconc:\myicons\ver1.ico setup.exe c:\myfiles

  2. replace an icon in the already existing SFX archive setup.exe with ver2.ico stored in the current folder

WinRAR s -iiconver2.ico setup.exe


Switch -IIMG<name> - specify SFX logo

Specify a bitmap image file to display as logo in the created or updated SFX archive. The <name> parameter is a name of .bmp file. You must not compress SFX module by any third party executable compressors if you are going to use -iimg.

This switch is the command line equivalent of "Load SFX logo from the file" option in SFX options: Text and icon dialog.

Size of default SFX logo is 93x302 pixels. It is recommended to use bitmaps of same size or smaller.

Examples

  1. add contents of c:\myfiles folder to setup.exe SFX archive and use c:\pictures\logo1.bmp as SFX logo

WinRAR a -sfx -iimgc:\pictures\logo1.bmp setup.exe c:\myfiles

  2. replace a logo in the already existing SFX archive setup.exe with logo2.bmp stored in the current folder

WinRAR s -iimglogo2.bmp setup.exe


Switch -ILOG[name] - log errors to file

Write error messages to the file rar.log created in WinRAR folder. You may view contents of this file using "View log…" command in Options menu. It is possible to specify another log file name instead of the default rar.log in the switch, for example, -ilogc:\log\backup.log. If the specified name does not include the path, the log file will be created in %APPDATA%\WinRAR folder.

If the option "Log errors to file" in General settings dialog is enabled, error messages will be written to rar.log even without -ilog switch.

By default, log file uses UTF-16 little endian encoding, but it can be changed with -sc<charset>g switch, such as -scag for native single byte encoding.


Switch -IM - show more information

Show more information in the command line mode. Now it can be used only with t command to issue a message also in case of successful archive test result. Without this switch "t" command completes silently if no errors are found.


Switch -INUL - disable error messages

Disable WinRAR error messages.


Switch -IOFF[n] - turn PC off

Turn PC off after completing an operation.

Use -ioff or -ioff1 to turn PC off, -ioff2 to hibernate, -ioff3 to sleep and -ioff4 to restart. Appropriate power features must be supported by operating system.

If several WinRAR copies are started, PC is turned off by a copy finished last.


Switch -ISND[-] - control notification sounds

Use -isnd to enable notification sounds and -isnd- to disable them.


Alphabetic switches list

-- | stop switches scanning
-@[+] | disable [enable] file lists
-ac | clear Archive attribute after compression or extraction
-ad | append archive name to destination path
-af<type> | specify archive format
-ag[format] | generate archive name using the current date and time
-ai | ignore file attributes
-ao | add files with Archive attribute set
-ap<path> | set path inside archive
-as | synchronize archive contents
-cfg- | ignore default profile and environment variable
-cl | convert file names to lower case
-cp<name> | select a compression profile
-cu | convert file names to upper case
-df | delete files after archiving
-dh | open shared files
-dr | delete files to Recycle Bin
-ds | do not sort archiving files
-dw | wipe files after archiving
-ed | do not add empty folders
-en | do not add "end of archive" block
-ep | exclude paths from names
-ep1 | exclude base folder from names
-ep2 | expand paths to full
-ep3 | expand paths to full including the drive letter
-e[+]<attr> | set file exclude or include attributes
-f | freshen files
-hp[pwd] | encrypt both file data and headers
-ht[b|c] | select hash type [BLAKE2,CRC32] for file checksum
-iadm | request administrative access for SFX archive
-ibck | run WinRAR in background
-ieml[.][addr] | send archive by email
-iicon<name> | specify SFX icon
-iimg<name> | specify SFX logo
-ilog[name] | log errors to file
-im | show more information
-inul | disable error messages
-ioff[n] | turn PC off
-isnd[-] | control notification sounds
-k | lock archive
-kb | keep broken extracted files
-log[fmt][=name] | write names to log file
-m<n> | set compression method
-ma[4|5] | specify a version of archiving format
-mc<par> | set advanced compression parameters
-md<n> | select dictionary size
-me[par] | set encryption parameters
-ms[list] | specify file types to store
-mt<threads> | set the number of threads
-n<file> | additionally filter included files
-n@<listfile> | read additional filter masks from list file
-oc | set NTFS "Compressed" attribute
-oh | save hard links as the link instead of the file
-oi[-] | save identical files as references
-ol | save symbolic links as the link instead of the file
-or | rename files automatically
-os | save NTFS streams
-ow | process file security information
-o[+|-] | set the overwrite mode
-p[pwd] | set password
-qo[-|+] | add quick open information [none|force]
-r | recurse subfolders
-r- | disable recursion
-r0 | recurse subfolders for wildcard names only
-ri | set priority and sleep time
-rr[N] | add data recovery record
-rv[N] | create recovery volumes
-s | create a solid archive
-s<N> | create solid groups using file count
-sc<charset>[objects] | specify the character set
-se | create solid groups using file extension
-sfx[name] | create self-extracting archive
-sl<size> | process files with size less than specified
-sm<size> | process files with size more than specified
-sv | create independent solid volumes
-sv- | create dependent solid volumes
-s- | disable solid archiving
-t | test files after archiving
-ta[m,c,a,o]<date> | process files modified after the specified date
-tb[m,c,a,o]<date> | process files modified before the specified date
-tk | keep original archive time
-tl | set archive time to newest file
-tn[m,c,a,o]<time> | process files newer than the specified time
-to[m,c,a,o]<time> | process files older than the specified time
-ts[m,c,a,p][+,-,1] | save or restore file time (modification, creation, access, preserve)
-u | update files
-v<n>[k|b|f|m|M|g|G] | create volumes
-vd | erase disk contents before creating volume
-ver[n] | file version control
-vn | use the old style volume naming scheme
-vp | pause before each volume
-w<path> | set folder for temporary files
-x<file> | exclude the specified file
-x@<listfile> | exclude files listed in the specified list file
-y | assume Yes on all queries
-z<file> | read archive comment from file


Switch -K - lock archive

WinRAR cannot modify locked archives, so locking important archives prevents their accidental modification by WinRAR. Such protection might be especially useful in case of WinRAR commands processing archives in groups.

This switch is not intended or able to prevent modification by other tools or willful third party. It implements a safety measure only for accidental data change by WinRAR.

Example

Add srcfiles to final.rar and lock resulting archive

WinRAR a -k final.rar srcfiles


Switch -KB - keep broken extracted files

This switch disables WinRAR to remove broken files after extraction.


Switch -LOG[fmt][=name] - write names to log file

This switch allows to write archive and file names to specified text file in archiving, extracting, deleting commands for RAR format and in archiving commands for ZIP format. Its behavior is defined by 'fmt' string, which can include one or more of following characters:

A | Write archive names to log file. If WinRAR creates or processes volumes, all volume names are logged.
F | Write processed file names to log file. It includes files added to archive and extracted, deleted or listed files inside of archive.
P | If log file with specified name exists, append data to existing file instead of creating a new one.
U | Write data in Unicode format.

If neither 'A' nor 'F' are specified, 'A' is assumed.

'name' parameter allows to specify the name of log file. It must be separated from 'fmt' string by '=' character. If 'name' is not present, WinRAR will use the default rarinfo.log file name.

It is allowed to specify several -log switches in the same command line.

This switch can be particularly useful, when you need to process an archive created with -ag or -v switches in a batch script. You can specify -loga=arcname.txt when creating an archive and then read an archive name generated by WinRAR from arcname.txt with an appropriate command batch file command, like: set /p name=<arcname.txt.

All functions of this switch are supported for RAR format only. In case of ZIP format only archiving operations are supported. Other archive formats do not support this switch.

Examples

  1. write names of created volumes to vollist.txt

WinRAR a -v100m -loga=vollist.txt volume.rar c:\data

  2. write the generated archive name to backup.txt in Unicode

WinRAR a -ag -logau=backup.txt backup.rar myfiles\*

  3. write names of tested volumes to vollist.txt and names of tested archived files inside of volumes to filelist.txt

WinRAR t -log=vollist.txt -logf=filelist.txt volume.part01.rar


Switch -M<n> - set compression method

Choosing <n> from 0 to 5 you may select an appropriate compression method

-m0 | Store | Add files to archive without compression
-m1 | Fastest | Fastest method (least compressive)
-m2 | Fast | Fast compression method
-m3 | Normal | Normal (default) compression method
-m4 | Good | Good compression method (more compressive)
-m5 | Best | Best compression method (most compressive but also most slow)

If this switch is not specified, WinRAR uses "-m3" method (Normal compression).

Compression method also can be selected with "Compression method" list in Archive name and parameters dialog.


Switch -MA[4|5] - specify a version of archiving format

By default WinRAR creates archives in RAR 5.0 format. Use -ma4 to create RAR 4.x archives. Use -ma5 or just -ma in case you need to override -ma4 saved in configuration and force WinRAR to use RAR 5.0 format.

This switch is used only when creating a new archive. It is ignored when updating an existing archive.

Example

Create RAR 4.x solid archive and compress SrcDir using 2 MB dictionary:

WinRAR a -ma4 -md2m data SrcDir


Switch -MC<par> - set advanced compression parameters

This switch is intended mainly for benchmarking and experiments. In the real environment it is usually better to allow WinRAR to select optimal parameters automatically. Please note that improper use of this switch may lead to very serious performance and compression loss, so use it only if you clearly understand what you do.

It has the following syntax:

-mc[param1][:param2][module][+ or -]

where <module> is the one character field denoting a part of the compression algorithm, which has to be configured. It may have the following values:

A | audio compression;
C | true color (RGB) data compression;
D | delta compression;
E | x86 executable compression;
I | Intel Itanium executable compression;
T | text compression.

RAR 5.0 archive format supports only 'D' and 'E' values.

'+' sign at the end of switch applies the selected algorithm module to all processed data, '-' disables the module at all. If no sign is specified, WinRAR will choose modules automatically, based on data and the current compression method. Switch -mc- disables all optional modules and allows only the general compression algorithm.

<Param1> and <Param2> are module dependent parameters described below.

Audio compression, delta compression

<Param1> is a number of byte channels (can be 1 - 31).

WinRAR splits multibyte channels to bytes, for example, two 16-bit audio channels are considered by WinRAR as four channels one byte each.

<Param2> is ignored.

x86 Intel executable compression, Intel Itanium executable compression, true color (RGB) data compression

<Param1> and <Param2> are ignored.

Text compression

The text compression algorithm provides noticeably higher compression on plain text data. But it cannot utilize several CPU cores efficiently resulting in slower compression time comparing to general algorithm in multicore and multiprocessor environment. Also its decompression speed is much slower than in general algorithm regardless of CPU cores number. This is why the text compression is disabled by default. You can specify -mct switch to allow WinRAR to select this algorithm automatically for suitable data. Switch -mct+ will force use of the text compression for all data.

Switch -mct can also include <Param1> and <Param2>, so its full syntax is -mc[param1][:param2]t[+ or -].

<Param1> is the order of PPM algorithm (can be 2 - 63).

<Param2> is memory in megabytes allocated for PPM (1-128).

PPM uses the equal memory size both to compress and decompress, so if you allocate too much memory when creating an archive, other people may have problems when decompressing it on a computer with less memory installed. Decompression will be still possible using virtual memory, but it may become very slow.

Examples:

  1. switch -mc1a+ forces use of 8-bit mono audio compression for all data.
  2. switch -mc10:40t+ forces use of text compression algorithm for all data, sets the compression order to 10 and allocates 40 MB memory.
  3. switch -mc12t sets the text compression order to 12, when the text compression is used, but leaves to WinRAR to decide when to use it.
  4. switches -mct -mcd- allow WinRAR to apply the text compression to suitable data and disable the delta compression.


Switch -MD<n>[k,m,g] - select the dictionary size

Sliding dictionary is the memory area used by compression algorithm to find and compress repeated data patterns. If size of file being compressed (or total files size in case of solid archive) is larger than dictionary size, increasing the dictionary is likely to increase the compression ratio, reduce the archiving speed and increase memory requirements.

For RAR 4.x archive format the dictionary size can be: 64 KB, 128 KB, 256 KB, 512 KB, 1 MB, 2 MB, 4 MB.

For RAR 5.0 archive format the dictionary size can be: 128 KB, 256 KB, 512 KB, 1 MB, 2 MB, 4 MB, 8 MB, 16 MB, 32 MB, 64 MB, 128 MB, 256 MB, 512 MB, 1 GB.

You can use 'k', 'm' and 'g' modifiers to specify the size in kilo-, mega- and gigabytes, like -md64m for 64 MB dictionary. If no modifier is specified, megabytes are assumed, so -md64m and -md64 are equal.

When archiving, WinRAR needs about 6x memory of specified dictionary size, so 512 MB and 1 GB sizes are available in 64 bit WinRAR version only. Maximum archiving dictionary size is even smaller and equal to 128 MB, when running in Windows XP x86. When extracting, slightly more than a single dictionary size is allocated, so both 32 and 64 bit versions can unpack archives with all dictionaries up to and including 1 GB.

If size of all source files for solid archive or size of largest source file for non-solid archive is at least twice less than dictionary size, WinRAR can reduce the dictionary size. It helps to lower memory usage without decreasing compression.

Default sliding dictionary size is 4 MB for RAR 4.x and 32 MB for RAR 5.0 archive format.

ZIP archives created by WinRAR always use 32 KB dictionary.

Dictionary size can also be selected in Dictionary size list in "Archive name and parameters" dialog.

Example

create a solid archive in RAR 5.0 format with 128 MB dictionary

WinRAR a -s -ma -md128 lib *.dll


Switch -ME[par] - set encryption parameters

Now only "ZL" (ZIP legacy) parameter is supported. So you can use -mezl switch together with -p[pwd] to create an encrypted ZIP archive using ZIP legacy encryption algorithm. Without -mezl ZIP archives are encrypted with AES-256, which is more secure, but can be incompatible with some older versions of unzip tools.

Example

create an encrypted archive with ZIP legacy encryption

WinRAR a -s -pmypassword -mezl docs.zip *.txt


Switch -- - stop switches scanning

This switch tells to WinRAR that there are no more switches in the command line. It could be useful, if either archive or file name starts from '-' character. Without '--' switch such a name would be treated as a switch.

Example

add all files from the current folder to the solid archive -StrangeName

WinRAR a -s -- -StrangeName


Switch -MS - specify file types to store

Switch -MS[list] - specify file types to store

Specify file types, which will be stored without compression. When used properly, it helps to increase archiving speed without noticeable loss in the compression ratio.

Optional <list> parameter defines the list of file extensions separated by semicolons. For example, -msrar;zip;jpg will force WinRAR to store without compression all RAR and ZIP archives and JPG images. It is also allowed to specify wildcard file masks in the list, so -ms*.rar;*.zip;*.jpg will work too. Several -ms switches are permitted, such as -msrar -mszip instead of -msrar;zip.

If <list> is not specified, -ms switch will use the default set of extensions, which includes the following file types:

7z, ace, arj, bz2, cab, gz, jpeg, jpg, lha, lz, lzh, mp3, rar, taz, tgz, xz, z, zip, zipx


Switch -MT<threads> - set the number of threads

<threads> parameter can take values from 1 to 32. It defines the recommended maximum number of active threads for compression algorithm also as for other WinRAR modules, which can start several threads. While WinRAR attempts to follow this recommendation, sometimes the real number of active threads can exceed the specified value.

Change of <threads> parameter slightly affects the compression ratio, so archives created with different -mt switches will not be exactly the same even if all other compression settings are equal.

If -mt switch is not specified, WinRAR will try to detect the number of available processors and select the optimal number of threads automatically.


Switch -N<file> - additionally filter included files

Apply the mask as an additional filter to included file list. Wildcards may be used both in the name and file parts of file mask. See switch -x description for details on mask syntax. You may specify the switch '-n' several times. This switch does not replace usual file masks, which still need to be entered in the command line. It is an additional filter limiting processed files only to those matching the include mask specified in -n switch. It can help to reduce the command line length sometimes.

For example, if you need to compress all *.txt and *.lst files in folders Project and Info, you can enter:

WinRAR a -r text Project\*.txt Project\*.lst Info\*.txt Info\*.lst

or using the switch -n:

WinRAR a -r -n*.txt -n*.lst text Project Info


Switch -N@<listfile> - read additional filter masks from list file

Similar to -n<file> switch, but reads filter masks from the list file.

This switch does not replace usual list files or file masks, which still need to be entered in the command line. It is an additional filter limiting processed files only to those matching the include mask specified in -n switch.

Example

WinRAR a -r -n@inclist.txt text Project Info @listfile.txt


Switch -O[+|-] - set the overwrite mode

This switch can be used both when extracting and updating archived files. Following modes are available:

-o | Ask before overwrite (default for extracting files)
-o+ | Overwrite all (default for updating archived files);
-o- | Skip existing files.


Switch -OC - set NTFS "Compressed" attribute

This switch allows to restore NTFS "Compressed" attribute when extracting files. WinRAR saves Compressed file attributes when creating an archive, but does not restore them unless -oc switch is specified. Shell mode equivalent of this switch is "Set attribute Compressed" option in "Advanced" part of extraction dialog.

This switch is supported only for RAR archives.


Switch -OH - save hard links as the link instead of the file

If archiving files include several NTFS hard links, store the first archived hard link as usual file and the rest of hard links in the same set as links to this first file. When extracting such files, WinRAR will create hard links instead of usual files.

You must not delete or rename the first hard link in archive after the archive was created, because it will make extraction of following links impossible. If you modify the first link, following links will also have the modified contents after extracting. Extraction command must involve the first hard link to create following hard links successfully. Supported for RAR 5.0 archives only.

This switch is the command line equivalent of Store hard links as links group of options in "Archive name and parameters" dialog.


Switch -OI[-][:<minsize>] - save identical files as references

If this switch is specified, WinRAR analyzes the file contents before starting archiving. If several identical files are found, the first file in the set is saved as usual file and all following files are saved as references to this first file. It allows to reduce the archive size, but applies some restrictions to resulting archive. You must not delete or rename the first identical file in archive after the archive was created, because it will make extraction of following files using it as a reference impossible. If you modify the first file, following files will also have the modified contents after extracting. Extraction command must involve the first file to create following files successfully.

It is recommended to use -oi only if you compress a lot of identical files, will not modify an archive later and will extract an archive entirely, without necessity to unpack or skip individual files. If all identical files are small enough to fit into compression dictionary specified with -md<n> switch, -s can provide more flexible solution than -oi.

Optional <minsize> value allows to define the minimum file size threshold. Files smaller than <minsize> are not analyzed and not considered as identical. If this parameter is not present, it is assumed to be 64 KB by default. Selecting too small <minsize> may increase the time required to detect identical files.

Supported for RAR 5.0 archives only.

Use -oi- if you wish to disable identical file processing enabled in WinRAR configuration.

This switch is the command line equivalent of Save identical files as references option in "Archive name and parameters" dialog.

Example:

Save contents of current folder to archive.rar. Store identical files, larger than or equal to 1000000 bytes, as references.

WinRAR a -oi:1000000 -ma archive


Switch -OL[A] - process symbolic links as the link [absolute paths]

Store NTFS symbolic links and reparse points as links, so file or folder contents is not archived. Such archive entries are restored as symbolic links or reparse points when extracting. Supported for RAR 5.0 archives only.

You may need to run WinRAR as administrator to create symbolic links when extracting.

WinRAR adds all links regardless of target when archiving with -ol switch. When extracting, by default, WinRAR skips symbolic links pointing outside of destination folder, with absolute paths, excessive number of ".." in link target or with other potentially dangerous link parameters. You can enable extracting such links with -ola switch.

Links pointing to folders outside of extraction destination folder can present a security risk. Enable their extraction only if you are sure that archive contents is safe, such as your own backup.

Links that are considered safe by WinRAR are extracted always regardless of -ol or -ola switch.

Switch -ol is the command line equivalent of Store symbolic links as links option in "Archive name and parameters" dialog. Switch -ola is equal to "Allow absolute paths in symbolic links" option in extraction dialog.


Switch -OR - rename files automatically

Rename extracted files automatically if file with the same name already exists. Renamed file will get the name like 'filename(N).txt', where 'filename.txt' is the original file name and 'N' is a number starting from 1 and incrementing if file exists.


Switch -OS - save NTFS streams

This switch has meaning only for NTFS file system and allows to save alternate data streams associated with a file. You may need to specify it when archiving if you use software storing data in alternative streams and wish to preserve these streams.

Streams are not saved for NTFS encrypted files.

Shell mode equivalent of this switch is the "Save file streams" option in the Archive name and parameters dialog.

This switch is supported only for RAR archives.


Switch -OW - process file security information

Use this switch when archiving to save file security information and when extracting to restore it.

WinRAR stores file owner, group, file permissions and audit information with this switch, but only if you have necessary privileges to read them. Note that only NTFS file system supports the file based security.

Shell mode equivalent of this switch is the "Save file security data" option in the Archive name and parameters dialog.

This switch is supported only for RAR archives.


Switch -P[pwd] - set password

Set password <pwd> to encrypt files when archiving or to decrypt when extracting. Passwords are case-sensitive. Maximum password length is 127 characters. Longer passwords are truncated to this length. If you omit a password in command line, you will be prompted to enter it.

In the shell mode a password may be entered through Enter default password dialog or in the Archive name and parameters dialog.

Example

add the contents of the folder "games" to the archive " secret", using the password ZaBaToAd

WinRAR a -pZaBaToAd -r secret games\*.*

Notes

  1. Use 8 characters or longer passwords for higher security. Avoid passwords which are easy to guess.
  2. Remember your passwords. If you forget a password to encrypted archive, you will not be able to unpack it.


Switch -QO[-|+] - add quick open information [none|force]

RAR archives store every file header containing information such as file name, time, size and attributes immediately before data of described file. This approach is more damage resistant than storing all file headers in a single continuous block, which if broken or truncated would destroy the entire archive contents. But while being more reliable, such file headers scattered around the entire archive are slower to access if we need to quickly open the archive contents in a shell like WinRAR graphical interface.

To improve archive open speed and still not make the entire archive dependent on a single damaged block, RAR 5.0 archives can include an optional quick open record. Such record is added to the end of archive and contains copies of file names and other file information stored in a single continuous block additionaly to normal file headers inside of archive. Since the block is continuous, its contents can be read quickly, without necessity to perform a lot of disk seek operations. Every file header in this block is protected with a checksum. If WinRAR detects that quick open information is damaged, it resorts to reading individual headers from inside of archive, so damage resistance is not lessened.

Quick open record contains the full copy of file header, which may be several tens or hundreds of bytes per file, increasing the archive size by the same amount. This size increase is most noticeable for many small files, when file data size is comparable to file header. So by default, if no -qo is specified or -qo without parameter is used, WinRAR stores copies of headers only for relatively large files and continues to use local headers for smaller files. Concrete file size threshold can depend on WinRAR version. Such approach provides a reasonable open speed to archive size tradeoff. If you prefer to have the maximum archive open speed regardless of size, you can use -qo+ to store copies of all file headers. If you need to have the smallest possible archive and do not care about archive open speed in different programs, specify -qo- to exclude the quick open information completely.

If you wish to measure the performance effect of this switch, be sure that archive contents is not stored in a disk cache. No real disk seeks are performed for cached archive file, making access to file headers fast even without quick open record.

This switch is the command line equivalent of Quick open information group of options in "Archive name and parameters" dialog.


Switch -R - recurse subfolders

Enables subfolder recursion. May be used with the commands: a, u, f, m, x, e, t, k, rr, c and s.

When used with the commands a, u, f or m, files in all sub-folders will be processed as well as in the current working folder.

When used with the commands x, e, t, k, rr, c or s, archives in all sub-folders will be processed as well as in the current working folder.

Examples:

  1. add the contents of the disk C to the archive Backup

WinRAR a -r Backup c:\*.*

  2. test all *.rar archives on the current disk

WinRAR t -r \*.rar


Switch -R0 - recurse subfolders for wildcard names only

Similar to switch -r, but when used with the commands a, u, f, m will recurse subfolders only for those file masks, which include wildcard characters '*' and '?'.

This switch works only for file names. Folder names without a file name part, such as 'foldername', are not affected by -r0 and their contents is added to archive completely unless -r- switch is specified.

Example

add all *.doc files from the current folder and its subfolders and file readme.txt only from the current folder to docs.rar archive. In case of usual -r switch, WinRAR would search for readme.txt in subfolders too.

WinRAR a -r0 docs.rar *.doc readme.txt


Switch -RI<p>[:<s>] - set priority and sleep time

This switch regulates system load by WinRAR. Possible task priority <p> values are 0 - 15.

If <p> is 0, WinRAR uses the default task priority. <p> equal to 1 sets the lowest possible priority, 15 - the highest possible.

Sleep time <s> is a value from 0 to 1000 (milliseconds). This is a period of time that WinRAR gives back to the system after read or write operations while compressing or extracting. Non-zero <s> may be useful if you need to reduce system load even more than can be achieved with <p> parameter.

Example

execute WinRAR with default priority and 10 ms sleep time:

WinRAR a -ri0:10 backup *.*


Switch -R- - disable recursion

Disable the subfolder recursion.

Even without -r switch WinRAR can enable the recursion automatically in some situations. Switch -r- prohibits it.

If you specify a folder name when archiving and if such name does not include wildcards, by default WinRAR adds the folder contents even if switch -r is not specified. Also WinRAR automatically enables the recursion if disk root without wildcards is specified as a file mask. Switch -r- disables such behavior.

For example:

WinRAR a -r- arc dirname

command will add only the empty 'dirname' folder and ignore its contents. Following command:

WinRAR a -r- arc c:\

will compress contents of root c: folder only and will not recurse into subfolders.


Switch -RR[N] - add data recovery record

This switch is used when creating or modifying RAR archive to add the data recovery record to archive. For RAR 4.x format 'N' parameter can be either the number of recovery sectors (n=1… 524288) or percent of archive size if '%' or 'p' modifers are specified after 'N'. For RAR 5.0 archives 'N' is always the percent of archive size regardless of persence of modifiers.

Syntax of this switch is similar to "RR[N]" command. Please read RR[N] command description and recovery record topic for more details.

Shell mode equivalent of this switch is the "Add recovery record" option in the Archive name and parameters dialog.

Example

add all *.txt files from the current folder to the archive Books and set the recovery record size to 3% of the total archive size

WinRAR a -rr3p Books *.txt


Switch -RV[N] - create recovery volumes

This switch is used when creating RAR multivolume archive to generate recovery volumes. Its syntax is equal to rv command.


Switch -S - create solid archive

Solid is a special archive type. Solid archiving significantly improves the compression ratio at the cost of archive update speed. This switch is meaningful only when creating a new RAR archive.

Shell mode equivalent of this switch is the "Create solid archive" option in Archive name and parameters dialog.

Example

add all *.c and *.h files from the current folder to the solid archive Sources

WinRAR a -s Sources *.c *.h

Please refer to the Solid archives chapter for further information.


Switch -SC<charset>[objects] - specify the character set

This switch allows to specify the character set for list files, log files and archive comment files.

'Charset' parameter is mandatory and can have one of the following values:

U | Unicode UTF-16
F | Unicode UTF-8
A | Native single byte encoding, which is ANSI for Windows
O | OEM (DOS) encoding

Endianness of source UTF-16 files, such as list files or comments, is detected based on the byte order mark. If byte order mask is missing, little endian encoding is assumed.

'Objects' parameter is optional and can have one of the following values:

G | Log files produced by -ilog switch
L | List files
C | Comment files

It is allowed to specify more than one object, for example, -scolc. If 'objects' parameter is missing, 'charset' is applied to all objects.

This switch allows to specify the character set for files in -z<file> switch, list files and comment files written by cw command.

Examples

  1. Read names contained in 'list' using OEM encoding:

WinRAR a -scol data @list

  2. Read comment.txt as Unicode file:

WinRAR c -scuc -zcomment.txt data

  3. Write comment.txt as Unicode file:

WinRAR cw -scuc data comment.txt


Switch -SE - create solid groups using extension

Similar to -s, but resets solid statistics if file extension is changed. Usually decreases compression, but also decreases data losses in case of solid archive damage.


Switch -SFX[name] - create self-extracting archive

If this switch is used when creating a new archive, a self-extracting archive (SFX) will be created. By default WinRAR uses as its SFX module the file Default.SFX for RAR archives and Zip.SFX for ZIP archives. These modules must be in the same folder as winrar.exe. It is possible to specify in the "-sfx" switch an alternate SFX module name.

Shell mode equivalent of this switch is the "Create SFX archive" option in the Archive name and parameters dialog.

Examples

  1. create self-extracting solid volumes

WinRAR a -sfx -v360 -s Games

  2. create archive using WinCon.SFX module

WinRAR a -sfxWinCon.SFX Gift.rar

See also s[name] command.


Switch -SL<size> - process files with size less than specified

Process only those files, which size is less than specified in <size> parameter of this switch. Parameter <size> must be specified in bytes.

Supported only for RAR and ZIP formats.


Switch -SM<size> - process files with size more than specified

Process only those files, which size is more than specified in <size> parameter of this switch. Parameter <size> must be specified in bytes.

Supported only for RAR and ZIP formats.


Switch -S- - disable solid archiving

Do not use solid archiving even if it was enabled in the default compression profile.


Switch -S<N> - create solid groups using file count

Similar to -s, but resets solid statistics after compressing <N> files. Usually decreases compression, but also decreases data losses in case of solid archive damage.


Switch -SV - create independent solid volumes

By default WinRAR tries to reset solid statistics as soon as possible when starting a new volume, but only if enough data was packed after a previous reset (at least a few megabytes). This switch forces WinRAR to ignore packed data size and attempt to reset statistics for volumes of any size. It decreases compression, but increases chances to extract a part of data if one of several solid volumes in a volume set was lost or damaged.

Note that sometimes WinRAR cannot reset statistics even using this switch. For example, it cannot be done when compressing one large file split between several volumes. WinRAR is able to reset solid statistics only between separate files, but not inside of single file.

Ignored if used when creating a non-volume archive.

Also you may put this option to RAR environment variable to use it in WinRAR shell.


Switch -SV- - create dependent solid volumes

Disables to reset solid statistics between volumes. It slightly increases compression, but significantly reduces chances to extract a part of data if one of several solid volumes in a volume set was lost or damaged.

Ignored if used when creating a non-volume archive.

Also you may put this option to RAR environment variable to use it in WinRAR shell.

See also: switch -sv


Switch -T - test files after archiving

Test files after archiving. This switch is especially useful in combination with the move command, so files will be deleted only if the archive had been successfully tested.


Switch -TA[m,c,a,o]<date> - process files modified after the specified date

Process only files modified after the specified date. Files matching the specified date exactly are also included.

Format of the date string is YYYYMMDDHHMMSS. It is allowed to insert separators like '-' or ':' to the date string and omit trailing fields. For example, the following switch is correct: -ta2001-11-20. Internally it will be expanded to -ta20011120000000 and treated as "files modified after 0 hour 0 minutes 0 seconds of 20 November 2001".

Use 'm', 'c', 'a' modifiers to specify modification, creation and last access time accordingly, such as -tac20011120 for creation time. If such modifier is omitted, modification time is assumed.

It is allowed to use several modifiers in the same switch, such as -tamc20190215, to set the same date for all specified times. Alternatively you can add several time filtering switches to command line. By default, time filters use AND logic, so a file must match all such filters to be processed. It can be changed to OR logic with 'o' modifier, so a file will have to match at least one 'o' filter. For example, use -taco20190201 -tamo20190210 to include files created after 2019-02-01 or modified after 2019-02-10.


Switch -TB[m,c,a,o]<date> - process files modified before the specified date

Process only files modified before the specified date. Files matching the specified date exactly are not included.

Format of the date string is YYYYMMDDHHMMSS. It is allowed to insert separators like '-' or ':' to the date string and omit trailing fields. For example, the following switch is correct: -tb2001-11-20. Internally it will be expanded to -tb20011120000000 and treated as "files modified before 0 hour 0 minutes 0 seconds of 20 November 2001".

Use 'm', 'c', 'a' modifiers to specify modification, creation and last access time accordingly, such as -tbc20011120 for creation time. If such modifier is omitted, modification time is assumed.

It is allowed to use several modifiers in the same switch, such as -tbmc20190215, to set the same date for all specified times. Alternatively you can add several time filtering switches to command line. By default, time filters use AND logic, so a file must match all such filters to be processed. It can be changed to OR logic with 'o' modifier, so a file will have to match at least one 'o' filter. For example, use -tbco20190201 -tbmo20190210 to include files created before 2019-02-01 or modified before 2019-02-10.


Switch -TK - keep original archive time

Prevents WinRAR from modifying the archive time when changing an archive.


Switch -TL - set archive time to newest file

Set the archive time to the time of the newest file in the archive. Forces WinRAR to set the time of a changed archive to the time of the newest file in the archive.


Switch -TN[m,c,a,o]<time> - process files newer than the specified time

Use this switch to process only those files, which are newer than the specified time period. Files matching the specified time period exactly are also included.

Format of the time string is:

[<ndays>d][<nhours>h][ <nminutes>m][<nseconds>s]

For example, use switch -tn15d to process files newer than 15 days and -tn2h30m to process files newer than 2 hours 30 minutes.

Use 'm', 'c', 'a' modifiers to specify modification, creation and last access time accordingly, such as -tnc2h30m for creation time. If such modifier is omitted, modification time is assumed.

It is allowed to use several modifiers in the same switch, such as -tnmc30d, to set the same period for all specified times. Alternatively you can add several time filtering switches to command line. By default, time filters use AND logic, so a file must match all such filters to be processed. It can be changed to OR logic with 'o' modifier, so a file will have to match at least one 'o' filter. For example, use -tnco30d -tnmo20d to include files with creation time newer than 30 days or modification time newer than 20 days.


Switch -TO[m,c,a,o]<time> - process files older than the specified time

Use this switch to process only those files, which are older than the specified time period. Files matching the specified time period exactly are not included.

Format of the time string is:

[<ndays>d][<nhours>h][ <nminutes>m][<nseconds>s]

For example, use switch -to15d to process files older than 15 days and -to2h30m to process files older than 2 hours 30 minutes.

Use 'm', 'c', 'a' modifiers to specify modification, creation and last access time accordingly, such as -toc2h30m for creation time. If such modifier is omitted, modification time is assumed.

It is allowed to use several modifiers in the same switch, such as -tomc30d, to set the same period for all specified times. Alternatively you can add several time filtering switches to command line. By default, time filters use AND logic, so a file must match all such filters to be processed. It can be changed to OR logic with 'o' modifier, so a file will have to match at least one 'o' filter. For example, use -toco30d -tomo20d to include files with creation time older than 30 days or modification time older than 20 days.


Switch -TS[m,c,a,p][+,-,1] - save or restore file time (modification, creation, access, preserve)

Use -tsm to save the file modification time, -tsc for creation time and -tsa for last access time. Multiple -ts switches, such as -tsc -tsa, are allowed. If 'm', 'c' or 'a' are not specified, all three file times are assumed.

Append '+' to store a file time with maximum possible precision. Concrete value depends on a operating system and file system and can be up 100 nanoseconds in Windows and 1 nanosecond in Unix. Append '1' to set 1 second precision or '-' to not save a file time. If '+', '-' or '1' are not present, '+' is assumed, so -ts+ and -ts both save all three high precision times.

All stored times for same file always have the same precision. If different precisions are specified, such as -tsm1 -tsc+, common one is selected.

RAR 4.x archives always contain the modification time and for RAR 4.x archive -tsm- still saves the modification time with the lowest possible 2 second precision. Two other times can be disabled. RAR RAR 5.0 archives allow to omit any file time including modification, so unpacked files will have the current system time. Switches -tsm- -tsc- -tsa- or just -ts- will store a low precision modification time for RAR 4.x and no file time for RAR 5.x archive.

If -ts switch is not specified, RAR stores the high precision modification time and omits two other times.

By default WinRAR sets only the modification time for extracted files, even if archive contains other times. Use -ts or -ts+ when unpacking to set all three times, -tsc and -tsa to set creation and last access times, -tsm- or -ts- to set the current system time instead of modification time stored in archive.

Use -tsp switch to preserve the original last access file time of source files when archiving. This switch keeps the original last access time of archiving files, but it does not control which timestamps are to be stored in archive. It has to be combined with other -ts switches for this purpose. For example, if we wish to save the last access time to archive and preserve the last access time of source files, we need to use -tsa -tsp together.

It is allowed to combine several modifiers in the same switch, such as -tscap instead of -tsc -tsa -tsp.

All modes described above are supported only by RAR format. In ZIP archives the high precision modification time is stored in the same data structure as creation and last access times. When archiving to ZIP, all three times are controlled by -ts or -tsm option, while -tsa and -tsc are ignored. Use -ts or -tsm to save all times in high precision format (default ZIP mode), specify -ts- or -tsm- to store only the low precision modification time. When unpacking ZIP archive, -tsm -tsc -tsa switches can be used individually to control corresponding times just like as for RAR format.

Examples

  1. Store all file times with the highest possible precision:

WinRAR a -ts backup

  2. Restore modification and last access time. Switch -tsm is not required, because RAR sets the modification time by default. If we wish to restore only the last access time, we should use -tsm- -tsa switches:

WinRAR x -tsa backup

  3. Store low precision modification and creation time. Preserve the last access time of source files.

WinRAR a -tsm1 -tsc1 -tsp backup


Switch -U - update files

May be used with archive extraction or creation. The command string a -u is equivalent to the command u. You could also use the switch "-u" with the command m .

If the switch "-u" is used with the commands x or e, then old files would be replaced only if new versions, extracted from the archive, are more recent, but unlike -f if an archived file has no matching unpacked file, it will still be extracted.

Shell mode equivalent of this switch is the "Add and update files" option in the Archive name and parameters dialog and "Extract and update files" option in the Extraction path and options dialog.

Supported only for RAR and ZIP formats.


Switch -V<n>[k|b|f|m|M|g|G] - create volumes

Create volumes with size=<n> *1000.

By default this switch uses <n> as thousands (1000) of bytes (not 1024 x bytes). You may also enter the size in kilobytes using the symbol 'k', in bytes using the symbol 'b', in megabytes - 'm', millions of bytes - 'M', gigabytes - 'g', billions (milliards) of bytes - 'G' or select one of several predefined values using the symbol 'f' following the numerical value. Predefined values can be 360, 720, 1200, 1440 or 2880 and replaced with corresponding floppy disk size. If the size is omitted, autodetection will be used.

It is allowed to enter decimal fractions using the dot as the decimal mark. For example, -v1.5g means 1.5 gigabytes.

You may specify several -v switches to set different sizes for different volumes. For example:

rar a -v100k -v200k -v300k arcname

sets 100 KB size for first volume, 200 KB for second and 300 KB for all following volumes.

If volumes are created on removable media, then after the creation of the first volume, the user will be prompted with:

Create next volume: Yes/No/Create All

At this moment in time, you should change the disks. Answering 'All' will cause all volumes to be created without a pause.

By default RAR volumes have names like 'volname.partNNN.rar', where NNN is the volume number. For RAR 4.x archive format using -vn switch it is possible to select another, extension based naming scheme, where the first volume file in a multivolume set has the extension .rar, following volumes are numbered from .r00 to .r99. RAR 5.0 archives do not support -vn and extension based names.

When extracting or testing a multivolume archive, you must use only the first volume name. If there is no next volume on the drive, the user will be prompted with:

Insert disk with <next volume name>. OK/Cancel

Insert the disk with the correct volume and press OK.

Archive volumes cannot be modified. Commands d, f, u and s cannot be used with multivolume sets. Command a can be used only to create a new multivolume set.

It is possible, although unlikely, that file size of a file in a multivolume set could be greater than its uncompressed size. This is due to the fact that 'storing' (no compression if size increases) cannot be enabled for multivolume sets.

Archive volumes may be solid and/or self-extracting.

Shell mode equivalent of this switch is the "Split to volumes" field in the Archive name and parameters dialog.

Example:

create a 1200000 bytes size solid, self-extracting volumes

WinRAR a -v1200 -s -sfx bitmaps


Switch -VD - erase disk contents before creating volume

All files and folders on the target disk will be erased before starting archiving operation, when '-vd' is used. If you create volumes, erasing will be performed before the creation of each volume, giving you the chance to archive to non-empty removable disks. You must be sure that disks do not contain any useful information.

The switch applies only to removable media, the hard disk cannot be erased using it.


Switch -VER[n] - file version control

Forces WinRAR to keep previous file versions when updating files in the already existing archive. Old versions are renamed to 'filename;n ', where 'n' is the version number. Supported only for RAR archives.

By default, when unpacking an archive without the switch -ver, WinRAR extracts only last added file version, the name of which does not include a numeric suffix. But if you specify a file name exactly, including a version, it will be also unpacked. For example, 'rar x arcname' will unpack only last versions, when 'rar x arcname file.txt;5' will unpack 'file.txt;5', if it is present in the archive.

If you specify -ver switch without a parameter when unpacking, WinRAR will extract all versions of all files that match the entered file mask. In this case a version number is not removed from unpacked file names. You may also extract a concrete file version specifying its number as -ver parameter. It will tell WinRAR to unpack only this version and remove a version number from file names. For example, 'rar x -ver5 arcname' will unpack only 5th file versions.

If you specify 'n' parameter when archiving, it will limit the maximum number of file versions stored in the archive. Old file versions exceeding this threshold will be removed.

When archiving with -ver switch, it is recommended to avoid names in 'filename;n' format among files to add. Such names can lead to duplicate entries if old version with same name either is present in archive or will be created later.


Switch -VN - use the old style volume naming scheme

By default RAR volumes have names like 'volname.partNNN.rar', where NNN is the volume number. For RAR 4.x archive format using -vn switch it is possible to select another, extension based naming scheme, where the first volume file in a multi-volume set has the extension .rar, following volumes are numbered from .r00 to .r99.

RAR 5.0 archives do not support -vn and extension based names.


Switch -VP - pause before each volume

By default WinRAR asks for confirmation before processing next volume only when archiving to removable disks and only if free disk space is less than volume size. This switch forces WinRAR to always ask for such confirmation when creating or extracting volumes. For example, it can be useful if you wish to copy new volumes to another media immediately after creating.


Switch -W<path> - set folder for temporary files

WinRAR needs to create temporary files and folders in some operations like archive modification. By default it creates them in folder specified in "Folder for temporary files" field of Paths page in "Settings" dialog. When you use WinRAR in command line mode, you can override this parameter with -w<path> switch.

Example:

use d:\tmp folder for temporary files, when adding a new comment to info.rar

WinRAR c -wd:\tmp -zcomment.txt info.rar


Switch -X<file> - exclude specified file

Exclude the specified file or folder from operation. Wildcards can be used in both the name and path parts of file mask. You can specify the switch -x several times to define several exclusion masks in the same command line.

If mask contains wildcards, it applies to files in current folder and its subfolders. It is not recursive without wildcards, so "filename" mask will exclude 'filename' file only in current folder when archiving or in root archive folder when extracting.

Use "*\filename" syntax to exclude "filename" recursively in all folders.

If you know the exact path to file, you can use "path\filename" syntax to exclude only this copy of "filename". If you use -xpath\filename syntax when unpacking an archive, "path" must be the path inside of archive, not the file path on the disk after unpacking.

By default, masks containing wildcards are applied only to files. If you need a mask with wildcards to exclude several folders, use the special syntax for folder exclusion masks. Such masks must have the trailing \ character. For example, "*tmp*\" mask will exclude all folders matching "*tmp*" and "*\tmp\" will exclude all 'tmp' folders. Since wildcards are present, both masks will be applied to contents of current folder and all its subfolders. Folder exclusion masks are supported for RAR and ZIP formats only.

If you wish to exclude only one folder, specify the exact name of folder including the absolute or relative path without any wildcards. In this case you do not need to append the path separator to mask, which is required only for folder exclusion masks containing wildcards to distinguish them from file exclusion masks.

Examples

  1. compress all files except *.jpg and *.avi in current folder and its subfolders

WinRAR a -r -x*.jpg -x*.avi rawfiles

  2. compress all files on the disk c: except temp folders and files inside of temp folders

WinRAR a -r -x*\temp\ savec c:\*

  3. extract all files except *.txt from docs.rar

WinRAR x -x*.txt docs


Switch -X@<listfile> - exclude files using a specified list file

Switch -X@<listfile> - exclude files listed in the specified list file

Exclude files which names are present in the listfile <listfile>

Example

add all *.exe files, except those which names are present in the list.txt, to the archive bin

WinRAR a -x@list.txt bin *.exe


Switch -Y - assume Yes on all queries

If this switch is specified, Yes will be the default and automatic reply to all queries.


Switch -Z<file> - read archive comment from file

If this switch is specified with any archive modification command, the archive comment is read from the file and added to archive. Use with -sc switch if you need to specify the character set for comment text file.

Example

add all files from the current folder to the solid archive Receipts with an archive comment from file Receipts.diz

WinRAR a -zReceipts.diz -s Receipts


Themes

Interface themes allow to modify the default WinRAR look by replacing it with alternative set of graphics. Themes are distributed as RAR archives having ".theme.rar" file extension. You can download them from "Themes" section of WinRAR home page. To install a new theme, just open the theme file in WinRAR like opening a usual RAR archive, for example, double click on its icon. Then confirm installation in the dialog displayed by WinRAR.

List of installed themes is available in submenu "Themes" of menu Options. Select any list item to activate the corresponding theme. This menu also contains commands "Organize themes…" providing theme management functions and "Get more themes…" loading themes web page.

Theme files are stored in Themes subfolder of %APPDATA%\WinRAR folder.


Select toolbar buttons

In this dialog you may specify toolbar buttons to display when browsing a disk folder ("Show outside of archives" group of options) or viewing archive contents ("Show inside of archives" options). It is also possible to change the buttons order, just select buttons to move and press "Move up" or "Move down" to change their position. If you wish to restore the default toolbar configuration, press "Default" button.

"Separator" button inserts a separator line just before the currently selected button. If you need to remove a separator, either turn off its check mark or place the cursor to it and then press "Separator" button.

Additionally to this dialog you may also drag toolbar buttons directly on the toolbar while holding down the Alt key.


Tools menu

Function | Shortcut
Wizard |
Scan archive for viruses | Alt+D
Convert archives | Alt+Q
Repair archive | Alt+R
Convert archive to SFX | Alt+X
Find files | F3
Show information | Alt+I
Generate report | Alt+G
Benchmark | Alt+B


Viewer settings

Viewer settings dialog

To activate this dialog select "Settings…" command in Options menu and click on "Viewer" tab. The dialog contents are described below.

Viewer type

Selects default action, when the user presses Enter on a file. Possible actions are:

Internal viewer | Use the internal WinRAR viewer
External viewer | Use an external viewer. You should define the name in the "External viewer name" field
Associated program | Use default Windows viewer for file type
Ask | Ask the user for the desired viewer type each time after pressing Enter

These settings are ignored for some file types. In the file management mode they are ignored for archives and executables. On Enter WinRAR always tries to open archives and to run exe files. In the archive management mode they are ignored for file types specified in "Unpack everything for" field of viewer settings dialog. If Enter is pressed on such file, WinRAR extracts the entire archive contents to a temporary folder, runs a file, waits for it to terminate, updates the source archive if necessary and then deletes the temporary folder and all of its contents. This provides the convenient method of installing applications directly from archives.

Unlike Enter, View file command always opens a file in the internal WinRAR viewer.

Internal viewer/Autodetect encoding

If this option is enabled, internal viewer attempts to automatically detect file contents as Windows text (ANSI), DOS text (OEM), Unicode UTF-8 or UTF-16 little endian. If detection is incorrect, it is possible to change encoding of already opened file using "View as…" commands in internal viewer "View" menu.

Internal viewer/Reuse existing window

If this option is off, WinRAR creates a separate internal viewer window for each viewing file. When the option is on, the already existing window is reused, so only one instance of the viewer is opened.

Internal viewer/Word wrap

Switches between wrapping long strings and scrolling modes in the internal viewer. This option affects only new viewer windows, already opened are not changed.

Unpack everything for

Here you may define file masks which require unpacking of complete archive contents, when user presses Enter or double clicks an archived file matching one of these masks. Masks must be separated by spaces. For example, if this field contains *.exe *.htm *.html, WinRAR will unpack the complete archive before opening an archived executable or HTML file. This option is necessary for those file types, which need to access other archived files for proper executing or viewing.

WinRAR ignores "Viewer type" setting for file types defined in "Unpack everything for" field and always opens them using an associated program.

Ignore modifications for

By default, WinRAR proposes to update an archive if viewer modified an opened file or created any new files, but it is possible to disable such behavior. You can enter one or several file masks separated by spaces in "Ignore modifications for" field and WinRAR will not prompt to update an archive if file created or modified by viewer matches one of these masks.

For example, if this field contains *.doc *.txt, any .doc and .txt files modified or created by external or associated viewer, will be ignored and any changes made by user in such files while viewing them will be lost. If you wish to disable archive updating for all viewed files, use * mask.

Masks in this option can have more complex syntax, combining archive and file mask separated by two backslash characters: arcmask\\filemask. Masks can include the path, which limits archives or files to specified folder and its subfolders. You can use environment variables in the path. It is allowed to omit 'arcmask\\' or 'filemask' components if you wish to match all archives or all files.

For example, *.rar\\*.txt means all .txt files in all .rar archives, *\\temp\* or just temp\* matches all files in 'temp' folders inside of archives and %temp%\*\\* or %temp%\*\\ instructs the viewer to not update any archives in Windows temporary folder.

External viewer name

If "On Enter run external viewer" option is set, here you need to specify a name of program to use as an external viewer. Name of file to view is passed to this program as a single parameter.


WinRAR.ini file

By default WinRAR stores settings in Registry. Such approach is reasonable when WinRAR is installed and used on the same single computer. But if you plan to install WinRAR on removable media, such as USB flash drive, and then run it on different computers occasionally, you may prefer to avoid storing any WinRAR specific data in Registry on those computers.

It is possible to redirect WinRAR Registry access to text file. If you create an empty WinRAR.ini file either in the same folder as WinRAR.exe or in %APPDATA%\WinRAR folder, WinRAR will redirect access to HKEY_CURRENT_USER\Software\WinRAR and HKEY_LOCAL_MACHINE\Software\WinRAR Registry keys to this file. WinRAR searches for this file first in its own folder and next in %APPDATA%\WinRAR.

Use "Create WinRAR.ini file" command in "Import and export" submenu to create a new WinRAR.ini file and copy existing WinRAR settings from Registry to this file. You need to copy a file created with this command either to WinRAR own folder or to %APPDATA%\WinRAR to make it active.

Typically current settings are written to WinRAR.ini only on exit, until that they are stored in memory. They are saved as case sensitive UTF-16LE text strings in following format:

<root key>\<key name>=value

where <root key> can be HKCU for HKEY_CURRENT_USER, HKLM for HKEY_LOCAL_MACHINE and Global for global settings added by user manually. String values are enclosed in quote marks and byte arrays have "bin:" prefix.

You can change global settings to control WinRAR.ini behavior. If write access to WinRAR.ini is not disabled, WinRAR creates strings listed below automatically and you need to edit a parameter after "=" to change an option. These strings are created at the top of WinRAR.ini. If you are going to disable write access with read-only attribute, you may need to add an appropriate string to WinRAR.ini manually before setting the read-only attribute, one command per line. All these strings use UTF-16LE encoding and are case sensitive, enter them exactly as mentioned here. Following global settings are available:

Global\AppData=0

Prohibit WinRAR to access APPDATA%\WinRAR folder. All files normally stored in this folder, such as registration key or interface themes, should be stored in the same folder as WinRAR.exe if Global\AppData=0 is specified. Specify Global\AppData=1 to allow access to APPDATA%\WinRAR.

Global\Integration=0

While WinRAR redirects its branches of HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE Registry keys to WinRAR.ini, it still writes data to HKEY_CLASSES_ROOT and other parts of Registry required to properly set the shell extension and file associations. For example, it happens when using Integration settings dialog. If you wish to prohibit any operations with Registry, add Global\Integration=0 to WinRAR.ini. WinRAR will not be able to change system integration settings after that. This command also prohibits creating or deleting WinRAR shortcut on Desktop and WinRAR program group. Specify Global\Integration=1 to allow system integration.

Global\SaveSettings=0

Disable writing current settings back to WinRAR.ini, so any configuration changes made in current WinRAR copy will be lost on exit. You can achieve the same result by setting read-only attribute to WinRAR.ini file. It is reasonable to configure WinRAR as you wish first, close WinRAR to store settings to file and only then add Global\SaveSettings=0 command. This mode may also affect other WinRAR components relying on WinRAR.ini, such as the shell extension not seeing changes in Context menu items dialog. Specify Global\SaveSettings=1 to allow saving settings to WinRAR.ini.

Notes

  • Unlike other Registry variables, "AppData" variable is not redirected to WinRAR.ini and always read from Registry. This variable defines location of %APPDATA%\WinRAR folder and since WinRAR.ini can be stored in this folder, we need to know a value of this variable before accessing WinRAR.ini.
  • If winrar.ini file is present in the same folder as WinRAR installer, winrar.ini will be copied to WinRAR program folder after completing installation.


Drag and drop support

WinRAR supports the Windows drag and drop facility.

If, in the file management mode, a single archive is dropped to WinRAR, the archive contents will be displayed and WinRAR will enter archive management mode.

If, in the file management mode, a one or more non-archive files are dropped to WinRAR, WinRAR will prompt for an archive name and add these files to that archive.

If, in the archive management mode, a single archive is dropped to WinRAR toolbar or address bar, contents of dropped archive will be displayed. If you wish to add one or more files to currently browsing archive, drop them to WinRAR file list. Though, if files are not archives, dropping them to toolbar or address bar will produce the same result as dropping to file list. Dropping files is available only into RAR and ZIP archives.

Regardless of the current WinRAR mode and archive format, you may drag files from WinRAR to other programs.

If you did not disable the option "Integrate WinRAR into shell" when installing WinRAR, you may drop files to RAR or ZIP archive icons on the Desktop to add files to an archive. Also if you drag an archive using the right mouse button and drop it to the destination folder, you may select "Extract Here" in the context menu to extract all iles from the dropped archive to the destination folder. If you drag a single non-archive file or several files with right mouse button and drop them to the destination folder, you will be able to create an archive containing these files in the destination folder using "Add to archive..." and "Add to <archive name>" commands in context menu.


Using context menus

If you did not disable the option "Integrate WinRAR into shell" when installing WinRAR, several additional items will be added to the standard file and folder context menus, which appear when you click the right mouse button on a file icon in Explorer or Desktop.

For archives WinRAR adds the items: "Extract files…", "Extract Here" and "Extract to <folder name>", where <folder name> is replaced with the real name of the folder. All the commands call WinRAR to extract archive contents, but the first command allows you to enter the destination folder and some extraction options in Extraction path and options dialog, while the second performs extraction to the current folder and the third to the proposed folder without additional questions. When you unpack a group of archives, the context menu will also include "Extract each archive to a separate folder" item allowing to place contents of each unpacked archive to separate folder.

Also WinRAR modifies "Properties" item of archives context menu to show archive information and, if present, archive comment. The archive information is similar to that displayed by Show information command.

For common files and folders WinRAR adds items: "Add to archive…", "Add to the archive <archive name>", "Compress and email…", "Compress to <archive name> and email", where <archive name> is replaced with the actual name of the archive. Both "Add" commands call WinRAR to add selected files to archive, but the first command allows to enter the archive name and some compression options in Archive name and parameters dialog, when the second starts adding to the proposed archive without additional questions. Similarly, both "Email" commands compress selected files and attach a created archive to email message, but the first allows to set additional options. You need to have a MAPI compliant email program installed to use these "Email" commands (most modern email programs support MAPI interface).


Wizard interface

WinRAR Wizard interface is designed for novice users and allows to perform basic compression and decompression operations using the simple step by step procedure.

You need to press Wizard button on WinRAR toolbar to display the wizard dialog. By default this button is visible both inside and outside of archives, but you may disable or enable it like other toolbar buttons with "Select buttons…" in General settings dialog. Another option of the same, "General settings" dialog, "Activate Wizard on start", allows to run Wizard every time when WinRAR starts.

Every Wizard dialog contains a brief instruction at the top, describing dialog contents and possible user actions. You may also press Help button to get more detailed instructions.


加入捷徑

在這裡您可以輸入新建捷徑的參數，將於自解檔程式解壓縮之後建立。這個對話方塊包含下列範圍：

建立位置

選擇您希望建立捷徑的位置。

來源檔名稱

被壓縮的檔案名稱。

目標資料夾

建立捷徑的資料夾，如果它不存在，它將被自我解壓縮檔建立。

捷徑敘述

敘述捷徑的純文字。

捷徑名稱

是由自解檔程式建立的 .lnk (捷徑) 檔案的檔案名稱。

捷徑圖示

關聯捷徑的圖示。如果留空白，則會使用預設圖示。如果檔名沒有包含完整路徑，自解檔會以同檔名搜尋解壓縮後的資料夾。

只有 [建立位置] 和 [來源檔名稱] 是必需的，所有其他的參數為選用。


%APPDATA%\WinRAR 資料夾

舊版 WinRAR 儲存補充檔案如註冊檔、匯出設定檔 settings.reg、面板或記錄檔等於 WinRAR 執行檔相同之資料夾。而在 Windows Vista 及之後的 Windows 版本並不建議將這類的檔案放在此資料夾。軟體企圖這樣做時甚至會發生錯誤。建議放置這類應用程式資料的地方是稱之為 %APPDATA% 資料夾的子目錄。

%APPDATA% 對應的真實路徑因 Windows 版本而異。要開啟 %APPDATA% 資料夾，請按照下列步驟: 打開檔案總管或 [我的電腦] 視窗，在位址列輸入 %APPDATA% 然後按 Enter 鍵。WinRAR 儲存相關的檔案於 %APPDATA% 下面的 "WinRAR" 資料夾。您可以在檔案總管位址列輸入 %APPDATA%\WinRAR 直接進入 WinRAR 資料之資料夾。

其實您不會經常主動存取 %APPDATA%\WinRAR。只有在您要複製 settings.reg 到其他的電腦，或使用其他外部檢視器瀏覽錯誤記錄時才會用到。

請注意 WinRAR 會同時從 %APPDATA%\WinRAR 及 WinRAR 程式資料夾尋找註冊檔及 settings.reg 檔，且 %APPDATA%\WinRAR 優先。

如果您希望取代 %APPDATA%\WinRAR 的路徑，您可以於註冊機碼 HKEY_CURRENT_USER\Software\WinRAR\Paths 設定新的字串值 "AppData" 給 WinRAR 資料檔。


壓縮檔類型

  • RAR 與 ZIP 的比較
  • RAR 5.0 壓縮格式
  • 支援其他壓縮格式
  • 結實壓縮檔
  • 自我解壓縮檔 (自解檔)
  • 分割壓縮檔 (多片)
  • 修復分割檔
  • 加密
  • 壓縮檔註解
  • 保護壓縮檔避免損壞
  • 鎖定壓縮檔
  • 如何選擇最佳化壓縮設定


壓縮時加入密碼

當您在建立過程時，此對話方塊可供您輸入要應用到壓縮檔案中的密碼。輸入的密碼只會對單一的目前壓縮操作有用，如果您需要改變整體的密碼時，您必須使用 [檔案] 功能表的 [設定預設密碼] 指令來輸入。

如果不選取 [顯示密碼] 選項，您將被要求輸入密碼兩次，以確認是否正確。

如果您設定 [檔案名稱加密] 選項， WinRAR 不只加密資料，而且加密所有包括檔案資料、檔案名稱、大小、屬性、註解和其他區塊等所有可觀察的壓縮檔案範圍，所以它提供更高的安全等級。在壓縮檔案中使用這個選項加密，沒有密碼時甚至不可能檢視檔案清單。這個操作只能在壓縮資料成 RAR 壓縮檔案時使用，不支援 ZIP 格式。

[ZIP 使用傳統加密法] 選項只有在加檔案到 ZIP 壓縮檔時才有效。這改用傳統 ZIP 加密演算法。如果關閉這個選項，ZIP 壓縮檔則用 AES-256，這樣安全性高，但是可能跟舊版 unzip 工具不相容。

如果您已經儲存一些密碼，您可以使用 [輸入密碼] 欄位的下拉式選單或使用自動完成的功能使用這些密碼。按一下 [整理密碼] 按鈕開啟 [整理密碼] 對話方塊，使用常用的密碼。

如果儲存的密碼以密碼鑰匙保護，您必須先在密碼提示中輸入密碼鑰匙並按 [確定] 才能存取。如果輸入的密碼跟密碼鑰匙不同，就會當作給壓縮用的密碼。


[指令參數] 對話方塊

此對話方塊可以進行時切換「完成時」選項，而不必中斷壓縮、解壓縮及測試壓縮檔的操作，完成時關機、休眠、睡眠或重新啟動電腦。

對壓縮而言，這裡可以選擇不同的壓縮率，但 WinRAR 不能在此對話方塊與「儲存」模式相互切換。


進階壓縮開關

進階壓縮選項

通常沒有必要改變這個對話方塊的設定，而且允許 WinRAR 自動選擇最佳化選項是安全的。請注意不正確的使用這個對話方塊可能導致非常嚴重的執行和壓縮損失，所以只有在您清楚您所作的時候，才能改變它的選項。

大多數以下的設定只支援 RAR 4.x 壓縮格式，沒有一項設定適用於 ZIP。只有 delta 壓縮及 32 位元執行檔壓縮能用於 RAR 5.0 壓縮檔。

這個對話方塊包含下列選項。

純文字壓縮/(自動/強制/停用)

純文字壓縮允許從純文字資料中增加壓縮比，不過其壓縮及解壓縮的效率在多核處理器的環境底下，相較一般壓縮演算法慢許多。因此這個選項的預設值為「停用」。您可以用 [自動] 來允許 WinRAR 自動選擇適合的演算法，或者 [強制] 來對所有資料均使用純文字壓縮演算法，不過您必須要有心理準備壓縮跟解壓縮的效能可能變慢。

在 [自動] 模式下，WinRAR 將根據源資料和是否選擇 [壓縮最佳] 或 [較好] 壓縮模式，決定什麼時候使用純文字壓縮。 [強制] 將把純文字壓縮演算法應用到所有資料上。在有些條件下它可能提供附加的壓縮效能，但是通常強制純文字壓縮的代價是速度的降低和記憶體使用的增加。 [停用] 從根本上阻止純文字壓縮演算法，在您想獲得最小的記憶體使用和最大的壓縮速度時可能有用。

純文字壓縮/預測順序

設定 PPM 演算法( RAR 純文字壓縮的核心) 的預測順序。值可以是 2 - 63。通常高的值會略微提高多餘資料的壓縮比，但是必須有作夠的記憶體來用於 PPM。在缺乏記憶體的條件下結果可能相反。更高的順序值會減慢壓縮和解壓的速度。如果這個區域設為 0，WinRAR 會自動選擇順序。

純文字壓縮/使用記憶體，MB

PPM 可用的以百萬位元組位元單位的記憶體 (1-128)。更高的值可以提高壓縮比，但是注意 PPM 壓縮和解壓使用的記憶體大小相等，所以建立一個壓縮檔案時如果分配太多的記憶體，其他人在安裝比較少記憶體的機器上解壓縮它時可能出現問題。如果這個區域設為 0 ，WinRAR 會自動選擇記憶體大小。

音訊壓縮/(自動/強制/停用)

在 [自動] 模式下，WinRAR 將根據源資料和是否選擇 [一般] 、 [壓縮最佳] 或 [較好] 壓縮模式決定什麼時候使用音訊壓縮。 [強制] 將把音訊壓縮演算法應用到所有壓縮資料上。只有當您確認所有的要壓縮的檔案完全由未加工的音訊資料構成時才啟動它。[停用] 從根本上阻止音訊壓縮演算法。

音訊壓縮被設計用來處理未加工的音訊資料，像 WAV 檔案。它不能增加已經被壓縮的音訊檔案的壓縮比，像 MP3。

音訊壓縮/頻道

頻道的位元組數 (可以是1 - 31)。

RAR 拆分多位元頻道成單位頻道，例如，兩個 16 位音訊頻道可以被 RAR 看作每個寬一位元組的四個頻道。如果這個區域設為 0，WinRAR 會自動選擇頻道數。

全彩壓縮：/(自動/強制/停用)

在 [自動] 模式下，WinRAR 將根據源資料和是否選擇 [一般] 、 [壓縮最佳] 或 [較好] 壓縮模式決定什麼時候使用全彩壓縮。 [強制] 將把全彩壓縮演算法應用到所有壓縮資料上。只有當您確認所有被壓縮檔案完全由全彩 (RGB) 資料構成才時啟動它。[停用] 從根本上阻止全彩壓縮演算法。

全彩壓縮被設計用來處理未加工的 RGB 基本顏色資料，像 24-位 BMP 檔案。它不能增加已經被壓縮的檔案的壓縮比，像 JPG。

啟用 x86 可執行壓縮

允許 WinRAR 使用特別為這種資料類型最佳化的演算法提高 x86 Intel 可執行檔案的壓縮比，同時應用於 32 位元及 64 位元 x86 可執行檔。

啟用 Itanium 可執行壓縮

允許 WinRAR 使用特別為這種資料類型最佳化的演算法提高 Intel Itanium 可執行壓縮比。

啟用 delta 壓縮

允許 WinRAR 使用特別為這種資料類型最佳化的演算法提高結構表資料的壓縮比。

預設 按鈕

重新設定這個對話方塊的所有值。


內容功能表項目

在 [設定]>[整合]>[內容選單項目] 中的 [拖放內容選單] 對話方塊可以在使用滑鼠右鍵拖放檔案之後，不要顯示壓縮及解壓縮指令於內容功能表上。預設值為開啟，因此 WinRAR 以滑鼠右鍵拖放檔案時，壓縮及解壓縮檔案以目標資料夾為目的地。

在這個對話方塊中，您可以選擇加入到檔案總管內容功能表中的項目，它們在您在檔案總管或桌面的檔案和資料夾圖示上按一下右鍵時顯示。

一般而言，如果在檔案總管對單一壓縮檔案右鍵，內容選單只包含解壓縮指令。您可以對 [永遠對以下顯示壓縮項目] 指定檔案類型，以空格分隔，因此壓縮指令會根據此類型顯示壓縮指令，無論該檔案是不是已經偵測為壓縮檔。如果您希望對所有類型壓縮檔都顯示壓縮及解壓縮指令，這裡請寫 "*"。


[定義分割檔大小] 對話方塊

此對話方塊可以讓您自定喜好的分割檔大小清單，與 [壓縮檔名稱及參數] 對話方塊中的 [分割檔，大小] 欄位關聯。

使用 [預先定義大小] 選項來選擇要顯示在清單中的磁碟大小。如果在 [預先定義大小] 裡面沒有您要的大小，您可以在 [使用者定義大小] 指定最多四個自定大小。您只需要輸入標籤及大小。標籤指的是簡短的文字，而大小則以位元組為單位。標籤可以省略。

在 [其他項目] 中的 [「自動偵測」字串] 選項控制清單中要不要顯示「自動偵測」字串。如果您從來不使用自動偵測分割檔案大小的功能偵測抽取式磁碟，您可以關閉此功能讓清單短一點。

[歷程項目] 選項定義先前使用過的項目，要存在清單當中的數量。如果您不想留下自訂分割檔大小的記錄，可以設定為零，此項最大的參數是 9。


輸入預設的密碼

在此對話方塊，您可以輸入預設的密碼，這可應用在加入、解壓縮、測試和檢視選項時。

如果 [顯示密碼] 選項是非啟用狀態，您也可以在壓縮操作下，視為您將會被要求輸入密碼兩次來進行正確性的確認。

如果您設定 [檔名加密]，WinRAR 不只加密資料，而且加密所有包括檔案資料、檔案名稱、大小、屬性、註解和其他區塊等所有可觀察的壓縮檔案區域，所以它提供更高的安全等級。在壓縮檔案中使用這個O加密，沒有密碼甚至不可能檢視檔案清單。這個操作值可在把資料壓縮成 RAR 壓縮檔案時有用，當使用預設密碼加密或壓縮成 ZIP 格式時，它被忽略。

[ZIP 使用傳統加密法] 選項是針對 ZIP 壓縮檔設計的。這會使用舊版 ZIP 加密演算法。關閉此選項，ZIP 使用 AES-256 演算法加密，比較安全，可是對某些舊版解壓縮工具可能不相容。

如果您啟用 [適用於所有壓縮檔] 選項並輸入空字串，則無論是解壓縮或測試都會跳過加密的壓縮檔。在下次關閉此選項之前都會停止開啟加密的壓縮檔或檔案。這個模式對無人職守下解壓縮一堆壓縮檔，又想避免停在問密碼的方塊中很好用。[適用於所有壓縮檔] 無法用於非空白密碼，因為非空白密碼的意思是不需要其他設定，就自動將預設密碼應用於所有壓縮檔。

如果您已經儲存一些密碼，您可以使用 [輸入密碼] 欄位的下拉式選單或使用自動完成的功能使用這些密碼。按一下 [整理密碼] 按鈕開啟 [整理密碼] 對話方塊，使用常用的密碼。

如果儲存的密碼以密碼鑰匙保護，您必須先在密碼提示中輸入密碼鑰匙並按 [確定] 才能存取。如果輸入的密碼跟密碼鑰匙不同，就會當作給壓縮用的密碼。


執行壓縮操作

一個壓縮操作被執行，一直等到結束或按 [取消] 按鈕立即中斷它。當壓縮或解壓縮時，您也可以按 [背景作業] 和 [暫停] 按鈕。 [背景作業] 把 WinRAR 最小化到工作列中。當完成目前操作後或您按一下工作列上的小 WinRAR 圖示它會自動修復。 [暫停] 按鈕暫停目前操作，您需要按 [繼續] 來修復它。

不管在壓縮還是解壓縮時，對話方塊上部的進度條都會顯示目前檔案的處理進度。

壓縮期間及某些解壓縮操作時，會顯示進一步的進度列，會在指令視窗的最下方展示執行的進度。其外觀由 [一般設定] 對話方塊中的 [Windows 進度列] 選項決定。如果關閉此選項，WinRAR 壓縮檔案時會使用三色進度列顯示。已壓縮的資料為黃色，讀取的資料為淡灰色，您可以比較黃色與灰色的比例大約知道壓縮率為何。如果 [Windows 進度列] 選項為開啟，則只使用兩種顏色。以上兩種情況，壓縮率也都會顯示在本視窗的另行中。

在壓縮、解壓縮及測試壓縮檔操作的期間，您仍可以使用 [模式] 按鈕來即時切換 [結束時] 選項，來關機、休眠、睡眠或重新啟動電腦。對壓縮而言，您還可以切換壓縮方法，但不能跟「僅儲存」之間切換。


解壓縮路徑和開關對話方塊：進階選項

解壓縮路徑和選項對話方塊：進階選項

在這個對話方塊您可以規定下列選項：

檔案時間

設定修改/建立/上次存取時間

Windows 檔案系統對每個檔案保存三種時間欄位：上次修改、建立及上次存取時間。WinRAR 的預設值只儲存上次修改時間，但使用壓縮對話方塊中 [時間] 部分的選項，可以啟用儲存建立及上次存取時間。即使這些時間欄位都存在壓縮檔中，您也必須在解壓縮時特別指定需要的時間才能將時間也解壓縮回來。有些壓縮檔可能與生俱來就不支援此選項。

屬性

壓縮後清除「保存」屬性

壓縮後清除「保存」屬性，這是為了備份設計的。

設定檔案安全性

這選項只對 NTFS 檔案系統有意義，如果先前有將檔案擁有者、群組、存取控制及報告資訊壓縮進來，則可以將它們修復。必須要在壓縮對話方塊指定 [儲存檔案安全性資料] 選項於 [進階] 部份，才能在建立壓縮檔時保留安全性資訊。您必須要有使用者功能的權限。處理安全性資訊可能會減緩壓縮時間，所以您要充分了解這功能的意義，真正需要才能使用它。家用使用者其實用不到大部分的安全性資訊。

這功能只支援 RAR 壓縮檔。

設定「壓縮」屬性

此選項能在解壓縮時還原 NTFS 的「壓縮」屬性。WinRAR 在壓縮時會保存「壓縮」屬性，但在解壓縮時要指定此選項才會還原。

這功能只支援 RAR 壓縮檔。

檔案路徑

解壓縮相對路徑

此選項是預設解壓縮模式。如果您從 WinRAR 介面瀏覽一些壓縮檔內的子目錄，若啟用 [解壓縮相對路徑] 選項，則當前目錄及之上目錄都會從解壓縮的檔案路徑移除。例如，如果您在壓縮檔內的資料夾 "Backup\MyData"，試圖解壓縮當中的 "Images" 資料夾，則會解壓縮成 "Images"，不是 "Backup\MyData\Images"。

如果您瀏覽壓縮檔根目錄資料夾，或從[內容] 功能表解壓縮，這個模式就與[解壓縮完整路徑] 選項相同。

解壓縮完整路徑

WinRAR 將壓縮檔解開至目標資料夾，並包含路徑資訊。不像 [解壓縮相對路徑] 模式，無論現在在哪個壓縮檔資料夾，路徑會完整地帶出來。

不要解壓縮路徑名稱

如果設定此選項，選擇的檔案從根目錄到所有子目錄都會解壓縮到目標資料夾。路徑資訊是忽略不計的。

解壓縮絕對路徑

如果壓縮檔是在壓縮對話方塊的檔案部分用 [儲存完整路徑，包含磁碟機代號] 建立的，您也指定 [解壓縮絕對路徑] 選項，WinRAR 會解壓縮檔案並還原到原來的磁碟機與資料夾。請小心使用，除非您確定壓縮檔沒有包含惡意的檔案，否則不要使用這個選項。請參考相對於此 WinRAR 選項的指令行 -ep3 開關，其中「解壓縮絕對路徑」的部份。此功能僅支援 RAR 及 ZIP 壓縮檔。

刪除壓縮檔

永遠不要

不要刪除已解壓縮的壓縮檔。

要求確認

要刪除已解壓縮的壓縮檔之前要求確認。

每次都要

不經確認，刪除已解壓縮的壓縮檔。

只有在全部的檔案都解壓縮出來，或者壓縮檔內所有的檔案都選取要解壓縮且都成功解壓縮時，WinRAR 才會考慮刪除壓縮檔。如果您解壓縮的是分割壓縮檔，所有的分割檔都會刪除。

請注意您可以在解壓縮對話方塊中的一般頁中，按一下 [儲存設定] 來設定成預設值。這個設定同時也對指令行及快捷選單有效。請特別小心使用 [要求確認] 特別是 [每次都要]，不當使用可能會造成資料流失。

雜項

背景解壓縮

開始進行解壓縮時將 WinRAR 最小化到工作列。

如果遇到其他 WinRAR 在工作，排在後面執行

遇到其他的 WinRAR 也在建立、修改或解壓縮檔案時，會先在 WinRAR 的工作佇列中排隊，等候完成或暫停。如果您要一次執行許多壓縮或解壓縮工作，如果能排隊進行，可以降低磁碟讀寫頭來回工作的時間，增加整體效能。

您可以從指令進度視窗按一下 [繼續] 按鈕，當您按 [繼續] 按鈕，不管其他的活動如何，WinRAR 都會停止等候。

這個選項不支援 7z 壓縮檔。

符號連結內允許絕對路徑

如果停用此選項，解壓縮指令略過指向目標目錄之外的符號連結，使用絕對路徑或連結目標只以 ".." 表示，或其他潛在危險的連結參數。連結指向解壓縮目標以外的目錄會出現安全性風險。請務必在確定壓縮檔內容為安全時才啟用這些解壓縮，例如您自己的備份。

連結指向解壓縮目標以外的目錄會出現安全性風險。請務必在確定壓縮檔內容為安全時才啟用這些解壓縮，例如您自己的備份。

允許潛在不相容名稱

因為 NTFS 檔案系統允許檔名後面存在空格及小數點記號，一堆 Windows 程式無法正確處理這類檔案。如果關閉選項，WinRAR 會解壓縮時自動移除檔名後面找到的的空格及小數點記號。


解壓縮路徑和開關對話方塊：一般選項

解壓縮路徑和選項對話方塊：一般選項

此對話方塊啟用時，您可以改變解壓縮檔案時的目標資料夾及一般選項。預設的目標資料夾是與壓縮檔案所在位置的資料夾相同，但您可以使用 [壓縮設定] 對話方塊來更改此預設值。您可以輸入新的路徑 (如果不存在時則自動建立)，在 [目標路徑] 區域，或是從資料夾樹窗格中選擇一個已存在的資料夾。

如果輸入的路徑包含磁碟機代號，但資料夾不存在，則它的上層或和輸入最相似的會被選擇，對話方塊將自動選擇您輸入的資料夾樹，但有小延遲 (大約 0.5 秒)，不會延遲太久。當然您也可以利用按一下 [顯示] 按鈕，強制對話方塊立即尋找目前輸入的資料夾名，這適用於您已經知道想要的資料夾，或者等太久改手動操作時。

進一步對目標資料夾，一般選項對話方塊也提供一些選項：

解壓縮對話方塊能調整大小。您可以拖曳視窗邊緣來改變大小，以便得到更多的空間來檢閱樹狀資料夾平台。WinRAR 會儲存此對話方塊的位置。

更新模式

解壓縮並取代檔案 (預設)

解壓全部選定的檔案。

解壓縮並更新檔案

解壓縮選定的檔案，然後複製目標資料夾不存在的，或是比解壓縮檔案還要舊的。

僅更新已經存在的檔案

只解壓縮選定的檔案，已存在目標資料夾和比壓縮檔案還舊的相同檔案，如果檔案在磁片不存在，將會跳過。

覆寫模式

覆寫前先詢問 (預設)

覆寫檔案之前先提示。

不用確認就覆寫

直接覆寫檔案，而沒有任何提示。

略過已經存在的檔案

不要覆寫已存在的檔案。

自動重新命名

如果相同檔名已經存在，自動重新命名解壓縮的檔案。重新命名的檔案長得像 'filename(N).txt'，其中 'filename.txt' 是原始檔案名稱，而 'N' 是數字。

雜項

解壓縮檔案至子資料夾

這個選項只有在一個以上壓縮檔案被解壓縮時可用。它把解壓縮的每個壓縮檔案的解壓縮的內容放到單獨的資料夾中，名字是基於壓縮檔名產生。

保留毀損的檔案

當解壓縮不正確時，WinRAR 不刪除損壞的檔案，例如在壓縮檔案已經壞掉時 (預設時，WinRAR 會刪除此類的檔案)。您可以試著從壞掉的檔案中儲存部分的資訊。

顯示檔案於檔案總管

解壓縮結束後，WinRAR 會開啟檔案總管視窗來顯示目標資料夾的內容。

儲存設定

如果您要儲存兩種 (一般及進階) 解壓縮對話方塊的設定，按一下 [儲存設定] 按鈕。下次打開該對話方塊時，儲存的設定就會變成預設值。WinRAR 儲存所有的選項，但不儲存目標路徑。如果您要指定預設的目標資料夾，請使用 [壓縮設定] 對話方塊。


為解壓縮的檔案輸入密碼

您正嘗試解壓縮一個被加密的檔案，請輸入密碼或取消解壓縮。

如果您一次解壓縮多個壓縮檔，可以啟用 [適用於所有壓縮檔] 選項來套用這個密碼至所有壓縮檔。這個選項在處理單一檔案時不適用。另一個應用的例子是用來忽略有加密的壓縮檔，在使用 [適用於所有壓縮檔] 的同時輸入空白的密碼就可以了。

如果您已經儲存一些密碼，您可以使用 [輸入密碼] 欄位的下拉式選單或使用自動完成的功能使用這些密碼。按一下 [整理密碼] 按鈕開啟 [整理密碼] 對話方塊，使用常用的密碼。

如果儲存的密碼以密碼鑰匙保護，您必須先在密碼提示中輸入密碼鑰匙並按 [確定] 才能存取。如果輸入的密碼跟密碼鑰匙不同，就會當作給壓縮用的密碼。


[壓縮檔名和參數] 對話方塊：進階設定選項

[儲存檔案安全性] 選項

此選項意味著只能在 NTFS 檔案系統下使用，並允許儲存檔案所有者、群組、檔案使用授權權和檢查資訊。您可能需要在替代資料流之下使用軟體儲存資料時設定它。資料流無法儲存 NTFS 加密檔。

此選項只支援 RAR 壓縮檔。

[儲存檔案資料流] 選項

此選項意味著只能在 NTFS 檔案系統下使用，並允許儲存與檔案相關聯的交替資料流。Windows 利用資料流來保留檔案資訊，例如檔案敘述等。如果您使用 RAR 來備份您的 NTFS 磁碟時，建議您指定此選項。

此選項僅支援 RAR 壓縮檔案。

儲存符號連結作為連結

儲存符號連結當成連結，所以檔案及資料夾內容不被壓縮。在 Windows 版本，這也將再解析點儲存為連結。這類的壓縮檔在解壓縮時會解析成符號連結或再解析點。您可能需要以系統管理員身分執行 RAR 才能在解壓縮時建立符號連結。符號連結指向目標路徑的外面，使用絕對路徑或適當數量 ".." 於連結目標，或其他潛在危險的連結參數，可以預防安全性的風險，而且只有在解壓縮對話方塊 設定 [符號連結內允許絕對路徑] 選項或指定 -ola 開關才會解壓縮。只支援 RAR 5.0 壓縮檔。

儲存永久連結作為連結

如果壓縮檔案包含許多永久連結，則儲存第一個壓縮的永久連結作為一般檔案，其他同組的永久連結連到第一個檔案。當解壓縮這類的檔案，RAR 會建立永久連結而不產生一般檔案。

您千萬不可以在建立壓縮檔之後，刪除或更名壓縮檔中第一個永久連結，不然會令相關的連結失效。如果您修改了第一個連結，則解壓縮之後所有連結都會解出一樣的、修改過的內容。解壓縮指定一定要包含第一個永久連結，才能成功建立之下的永久連結。只支援 RAR 5.0 壓縮檔。

[檔案分割操作後暫停] 選項

當使用移動磁碟機建立或解壓縮下一分割檔前，RAR 預設進行詢問。這個總是強制 WinRAR 進行這樣的詢問。如果磁碟空間有限並且您希望建立後立即複製每一分割檔案到其他磁片中時，可以使用它。

[舊式分割檔命名] 選項

預設 RAR分割檔以 'volname.partNNN.rar' 格式命名，NNN的地方是分割檔案編號。RAR 4.x 使用此選項開關可轉換成其他的擴展基本命名規則，分割檔案群組中第一分割檔案檔案由 .rar 的副檔名，以後分割檔案從 .r00 到 .r99 命名。RAR 5.0不支援此選項及擴展基本命名規則。

[修復分割檔] 選項

這個指令只可用於建立 RAR 分割檔壓縮檔時，您只需選擇要建立的修復分割檔的數目。您也可以附加一個百分號到這個選項上，這樣建立的 .rev 檔案的數目將等於從 RAR 分割檔案總數獲得的這個百分比。每個修復分割檔可以重建一個遺失的 RAR 分割檔案。您可以從這裡獲得更多資訊。

[背景壓縮作業] 選項

當開始壓縮操作時將 WinRAR 最小化，放在工作列中。

[如果遇到其他 WinRAR 在工作，排在後面執行] 選項

遇到其他的 WinRAR 也在建立、修改或解壓縮檔案時，會先在 WinRAR 的工作佇列中排隊。如果您要一次執行許多壓縮或解壓縮工作，如果能排隊進行，可以降低磁碟讀寫頭來回工作的時間，增加整體效能。

[繼續] 按鈕在此操作會凌駕此選項規定。您可以從指令進度視窗按一下 [繼續] 按鈕，強迫 WinRAR 不要等待。

[如果遇到其他 WinRAR 在工作，排在後面執行] 選項

如果啟用，則執行時遇到其他的 WinRAR 也在建立、修改或解壓縮檔案時，會等到前面的 WinRAR 結束工作或暫停才會開始執行。如果您要一次執行許多壓縮或解壓縮工作，如排程執行等，這樣可以降低磁碟來回工作的時間，增加整體效能。

[修復記錄]

設定修復記錄大小為整體壓縮檔大小的百分比。越大的修復記錄，越能修復嚴重的損壞，但會增加壓縮檔大小以及處理時間。所以壓縮檔的 3 - 10% 已約略足夠。此輸入欄位只有開啟一般頁面中的 [加入修復記錄] 才有效。您無法設定為 0，如果不想使用修復記錄，請將 [加入修復記錄] 關閉。

[壓縮設定]

打開 [進階壓縮選項] 對話方塊，這裡您可以設定不同的 WinRAR 壓縮演算法模組。這個對話方塊中的不正確選項甚至可能嚴重傷害壓縮的表現，所以要小心使用。

[自解檔選項]

選擇自解檔模組並設定例如目標路徑或視窗標題等的選用自解檔選項。請注意自解檔選項僅能夠應用在 Windows 圖形介面模組，而不支援指令行或非 Windows 自解檔模組。該 [自解檔選項] 按鈕僅在如果您啟用 [一般設定] 對話方塊的 [建立自我解壓縮檔] 時有效。

您可以把選定的自解檔選項儲存到壓縮設定檔，WinRAR 會加入指令敘述的自解檔選項到壓縮檔註解。

[完成時] 選項

當操作完成時將電腦關閉、休眠、睡眠或重新啟動電腦。硬體必須支援軟體對應的電源模式。


[壓縮檔名和參數] 對話方塊：備份選項

[壓縮之前先清理目標磁碟] 選項

在開始壓縮操作之前，全部目標磁片的檔案和資料夾將會先被清除。如果您建立分割檔，在建立每一個分割檔案之前均會先執行清除，以避免您意外放入非空白的卸除式磁片，但您必須確定這些磁片不包含任何有用的資訊。此選項只能應用在卸除式磁片上，硬碟則不能使用清除功能。

[僅加入屬性為「保存」的檔案] 選項

僅設定有 [保存] 屬性的檔案才被加入，資料夾無論屬性為何都會加入。此選項主要是設計於備份操作使用。

[壓縮後清除「保存」屬性] 選項

把成功壓縮的檔案清除 [保存] 屬性，資料夾屬性不會改變。此選項主要是為備份操作設計。

[開啟分享的檔案] 選項

允許處理已被其他應用程式打開的檔案寫入。當應用程式允許檔案讀取權限，但所有檔案存取又被禁止，檔案開啟仍為失敗時，這個選項很有用。

此選項有危險性，因為它允許檔案被壓縮，但是此檔案可能正被其他的應用程式做修改，請小心使用。

[使用遮罩產生壓縮檔名稱] 選項

當建立壓縮檔案時，附加目前的日期字串到壓縮檔名，這對於每日的備份相當有用。日期字串是利用指定的遮罩樣式格式所指定，請讀取 開關 -ag 來獲得遮罩樣式的敘述。

[保留前面檔案版本] 選項

當更新已經存在的壓縮檔案中的檔案時，強制 WinRAR 保留以前的檔案版本。老版本被改名成 'filename;n'，'n'的位置是版本編號。這個功能僅支援 RAR 檔案。

使用此選項時，建議避免使用 'filename;n' 之類的名稱格式來添加，如果舊版在壓縮檔既有或即將建立的使用同名稱，會引起產生重複項目。


[壓縮檔名和參數] 對話方塊：註解

這裡您可以指定壓縮檔註解來新增或更新壓縮檔內的註解。您也可以從 [從檔案載入註解] 輸入含有註解文字的檔案，也可以從 [手動加入註解] 手動輸入文字。


[壓縮檔名和參數] 對話方塊：檔案

要加入的檔案

要壓縮的檔案和資料夾名稱。此區域會自動填入已選定的檔案，但如果需要的話，您也可以編輯它們，或按一下 [附加] 按鈕選擇更多檔案加入清單。

在此它允許使用萬用字元過濾遮罩，此範例下 WinRAR 將會在目前資料夾和全部的子資料夾尋找符合過濾遮罩的檔案。如果您要指定多個遮罩，請用空白字元隔開。如果遮罩含有空白字元，請用半形雙引號括起來。例如，您可以輸入：

*.txt *.doc "set 1.*"

則會壓縮全部 .txt 和 .doc 中符合 "set 1.*" 遮罩的檔案。

要排除的檔案

指定檔案遮罩和檔案名稱從壓縮操作的檔案中排除。萬用字元在檔案和名稱遮罩部分都被支援。如果您要指定多個遮罩，請用空白字元隔開。如果遮罩含有空白字元，請用半形雙引號括起來。例如，您可以輸入：

c:\temp\info.txt *.bak *.tmp *\temp\

跳過 c:\temp\info.txt 檔案、所有 .bak 和 .tmp 檔案和 temp 資料夾及其中的所有檔案。您可以手動輸入檔名或使用 [附加] 按鈕瀏覽要排除的檔案。

排除遮罩語法的細節詳見 開關 -x。此開關與 [要排除的檔案] 欄位排除遮罩的語法相同。

如果您用萬用字元排除遮罩，則會應用到目前的資料夾及其子資料夾。不過如果沒有使用萬用字元，是不會向下遞迴的，所以如果您要在子資料夾中也排除 "filename" 的話，就要輸入 "*\filename"。如果您確定該檔案的絕對路徑，則您可以使用 "path\filename" 語法，指排除該 "filename"。

不壓縮僅儲存的檔案

指定檔案遮罩和檔案名稱不壓縮而直接僅儲存。這個選項被用來僅儲存已經壓縮的檔案，這將說明增加壓縮速度，而不會顯著的減小壓縮比。如果您要指定多個遮罩，請用空白字元隔開。如果遮罩含有空白字元，請用半形雙引號括起來。例如，您可以輸入：

*.rar *.zip *.jpg

將不壓縮直接僅儲存所有的 RAR 和 ZIP 壓縮檔案和 JPG 圖像。

檔案路徑

選擇在壓縮檔案內儲存檔案路徑的方法。WinRAR 預設儲存相對路徑，也能儲存除了磁碟機號與首碼的反斜線字元的完整路徑、不含路徑的檔名，或含有磁碟代號的完整路徑。

相對路徑模式不含當前 WinRAR 資料夾。在 [加入的檔案] 欄位手動輸入的路徑，則排除基本資料夾到 -ep1 開關指定的路徑。

如果您儲存不含路徑的檔名，可能會建立含有數個相同檔案名稱的壓縮檔案，因此使用 [不要儲存路徑] 選項時請小心。

如果您儲存完整路徑並包括磁碟機代號，WinRAR 會將磁碟機代號分隔 (冒號) 以底線替代。如果您在 [進階] 對話方塊中指定 [解壓縮絕對路徑]，則 WinRAR 能在解壓縮時，自動將底線變回冒號，來將解壓縮檔案還原回當初的資料夾及磁碟。要了解更多好壞，請參考相對於此 WinRAR 選項的指令行 -ep3 開關，其中「儲存完整路徑，包含磁碟機代號」的部份。

一個檔案建立一個壓縮檔

將每一個目前資料夾選定的檔案和選定的子資料夾的所有檔案均獨立壓縮，每一個壓縮檔案僅包含一個檔案。如果您設定該選項，輸入的壓縮檔名將予忽略，而以檔案名稱為準，建立壓縮檔名稱。

壓縮檔使用雙副檔名

此選項修改 [一個檔案建立一個壓縮檔] 的行為。如果開啟 [壓縮檔使用雙副檔名]，則從 [一個檔案建立一個壓縮檔] 建立的壓縮檔會使用 filename.ext.rar 格式，也就是壓縮檔副檔名添加在檔名後面。如果關閉此選項，則使用 filename.rar 格式，壓縮檔副檔名取代原來的副檔名。即使關閉此選項，WinRAR 遇到檔名相同、副檔名不同的檔案還是會使用雙副檔名。

子資料夾內的壓縮檔

此選項修改 [一個檔案建立一個壓縮檔] 的行為。 如果開啟 [子資料夾內的壓縮檔]，[一個檔案建立一個壓縮檔] 會將子資料夾內的所有檔案分別建立壓縮檔。如果關閉此選項，則每個子資料夾的所有內容會被壓縮成一個檔案。

透過電子郵件傳送壓縮檔給 [<位址>] [然後刪除檔案]

這個操作附加一個使用加入指令建立或被更新的壓縮檔案到電子郵件資訊中。您需要有 MAPI 相容的電子郵件用戶端來使用這個選項 (大部分現代的電子郵件程式支援MAPI介面)。 如果您不輸入目標電子郵件，會被您的電子郵件程式詢問。如果您設定 [然後刪除檔案] 選項，壓縮檔案會在把它成功附加到電子郵件附件中後刪除。

如果建立分割壓縮檔案使用 [使用電子郵件發送壓縮檔案] 選項，每一分割檔案都附加到單獨的電子郵件附件中。


[壓縮檔名和參數] 對話方塊：一般設定

對話方塊包括下列項目：

目標壓縮檔名

可以手動輸入或按一下 [瀏覽] 按鈕以瀏覽壓縮檔名；您可以輸入包含磁碟機號的名稱或者是完整路徑給壓縮檔。

設定檔

打開此功能表允許建立新設定、管理和選擇壓縮設定檔 。壓縮設定檔允許您快速的還原先前儲存的壓縮選項或是在此對話方塊指定預設的選項值。WinRAR 提供少數預先定義的最佳化設定檔，有建立電子郵件附件，備份檔案和其他操作等。當前使用的設定檔名稱會顯示在 [設定檔...] 按鈕上方。讀取壓縮設定檔主題可獲得更多資訊。

壓縮格式 (RAR, RAR4, ZIP)

為新建立的壓縮檔選擇格式。您可以指定 RAR 來使用最新的 RAR 5.0 格式、相容於 WinRAR 的 RAR4 格式，或 ZIP 格式建立 ZIP 壓縮檔。根據選擇的壓縮檔格式，進階不支援的功能選項會停用。如果您更新已經存在的壓縮檔，則會忽略此選項，WinRAR 用當初的格式更新壓縮檔。

為新建立的壓縮檔選擇格式。您可以指定RAR 來使用與 RAR 4.x 相容格式、RAR5 最新 RAR 5.0 格式，或者ZIP 建立 ZIP 壓縮檔。根據選用的壓縮檔格式，有些不支援的進階選項會停用。如果您是更新已存在的壓縮檔，則會忽略此選項，WinRAR 會沿用更新壓縮檔原先的格式。

壓縮方法

從 [僅儲存]、[速度最快]、[速度快]、[一般]、[壓縮佳]、[壓縮最佳] 之間選擇。[僅儲存] 不壓縮直接寫入檔案，速度最快。從速度最快到壓縮最佳的選項，壓縮率越高，處理速度越慢。

字典檔大小

可調整的字典檔是壓縮演算法中，用來尋找和壓縮重複資料特徵的記憶體。如果壓縮的檔案大小，或者結實壓縮檔的總大小比字典檔大時，則增加字典檔大小從某個角度而言會增加壓縮率、降低壓縮速度、提高對記憶體的需求。進行壓縮時，需要大約指定字典檔大小的六倍記憶體。解壓縮時，大約配置比字典檔略大的記憶體。如果您希望您的 RAR 5.0 壓縮檔能被所有的電腦，包含低記憶體的電腦解壓縮，最好避免選用最大化的字典檔大小，改選中性一點的，如 32 或 64 MB。

RAR 4.x 壓縮檔最大的字典檔大小為 4 MB，64 位元的 WinRAR 支援的 RAR 5.0 格式可以讓建立的壓縮檔大到 1 GB，而 32 位元的 WinRAR 也支援到 256 MB (在 Windows XP x86 則為 128 MB)。解壓縮時，大約配置比字典檔略大的記憶體，因此 32 位元跟 64 位元版本都能解開所有大於 1 GB 字典檔的壓縮檔，只要電腦有大於 1 GB 的記憶體都辦得到。ZIP 格式的字典檔大小固定為 32 KB。

如果結實壓縮檔內所有來源檔的大小總和或非結實壓縮檔內的最大來源檔都比字典檔大小的一半小，WinRAR 會降低字典檔大小，這樣可以降低記憶體的使用量也不會影響壓縮比。

分割檔 大小，如果您要建立分割檔案壓縮的話

如果您想建立分割檔，請在此輸入單元分割檔的大小。您也可以在大小欄位的右邊下拉選單選取單位，在清單中 "B" 表示 bytes, "KB" - kilobytes, "MB" - megabytes，而 "GB" - gigabytes

也可以利用 Windows 地區設定定義的十進位分隔符號來以十進位指定。

同時您也可以自行在大小字串的後面補充一兩個單位字串。小寫的 'k' 表示 kilobytes，大寫的 'K' - 一千個 bytes, 'm' - megabytes, 'M' - 百萬個 bytes,'g' - gigabytes, 'G' - 十億個 bytes。"KB", "MB" 及 "GB" 永遠表示 kilobytes, megabytes 及 gigabytes，無論大小寫。

分割檔大小輸入欄位有關聯的下拉清單，包含之前輸入的、預先定義的以及使用者定義的。您可以使用此清單快速選取。可以藉由 [定義分割檔大小] 對話方塊自訂此清單。要使用它，請在 [壓縮設定] 對話方塊中按 [定義分割檔大小] 按鈕。

注意，如果您壓縮到卸除式磁片，且使用 RAR 模式，您可以從清單中選擇 [自動偵測] 字串，而 WinRAR 將會自動為新的分割檔案選擇分割檔案的大小。

更新模式

  • 加入並取代檔案 (預設) 當加入的檔案有相同名稱時，始終替換已壓縮的檔案。在壓縮檔案中不存在時，始終加入這些檔案。
  • 加入並更新檔案 僅在加入的檔案較新時才替換已壓縮的檔案。在壓縮檔案中不存在時，總是加入這些檔案。
  • 僅更新已經存在的檔案 僅在加入的檔案較新時才替換已壓縮的檔案。在壓縮檔案中不存在時，不加入這些檔案。
  • 覆寫前先詢問 蓋過壓縮檔之前先詢問，而不在壓縮檔中的檔案則永遠加入。
  • 略過存在的檔案 不要蓋過已經存在壓縮檔之中的檔案，而不在壓縮檔中的檔案則永遠加入。
  • 壓縮檔內容同步化 僅在加入的檔案較新時才替換已壓縮的檔案。在壓縮檔案中不存在時，總是加入這些檔案。在加入的檔案不存在壓縮檔案時，刪除這些檔案。這類似建立一個新壓縮檔案，但有個重要的不同：如果在上次備份後，沒有檔案被修改過，這項操作會比建立新壓縮檔來的還要快。

[壓縮完將檔案刪除] 選項

移除壓縮成功後的刪除原始檔案

[建立自我解壓縮檔] 選項

建立自我解壓縮檔 (exe 檔案)，這是一種不使用任何其他程式便能解壓縮的方式。您可以選擇自解檔模組的類型，並且可以在 [進階設定] 對話方塊內設定如目標資料夾等選項。

[建立結實壓縮檔] 選項

建立 結實 壓縮檔案。通常可獲致較高的壓縮比，但有一些限制。請讀取結實壓縮檔案的敘述可獲得更多詳細資料。

[放置修復記錄] 選項

加入修復記錄，這可在壓縮檔案損壞時說明還原。您可以在 [進階設定] 對話方塊指定修復記錄的大小，預設值是關於壓縮檔案總大小的 3%。

[測試壓縮檔] 選項

壓縮後測試。 這個選項在 [壓縮後刪除] 時非常有用，所以只有壓縮檔案已經被成功測試後，檔案才會被刪除。

[鎖定壓縮檔] 選項

WinRAR 無法修改鎖定的壓縮檔，所以請鎖定重要的壓縮檔以防止意外被 WinRAR 修改。這指令並不能防止其他工具或其他人蓄意竄改，這只是為了預防被 WinRAR 意外修改而已。

設定密碼

設定密碼來為壓縮檔 加密。一次壓縮只能用一組密碼，且能取代在 [檔案] 選單預設的密碼。如果有預設密碼，則壓縮結束後會還原成預設密碼。如果預設密碼在壓縮時尚未出現，則壓縮之後預設密碼仍為空白。


[壓縮檔名和參數] 對話方塊

在加入檔案到壓縮檔之前執行加入檔案到壓縮檔指令會顯示此對話方塊。

在此對話方塊的選項包含四個分開的選項組，選擇下面的任一個項目均可讀取組的詳細敘述：

  • 一般
  • 進階
  • 選項
  • 檔案
  • 備份
  • 時間
  • 註解


[壓縮檔名和參數] 對話方塊：時間選項

儲存修改、建立、存取時間

允許在壓縮檔中儲存檔案修改、建立、存取時間，只支援 RAR 壓縮檔。只有 RAR 5.0 可以不儲存檔案修改時間。如果任一種時間沒有存到壓縮檔，則解壓縮時會指派當時系統的時間。

您需要在解壓縮對話方塊的進階部分開啟 [設定建立時間] 及 [設定存取時間] 選項才能在解壓縮時還原這些時間。至於[設定修改時間] 則預設為開啟。

[高精度修改的日期] 選項

如果這個選項停用，則檔案修改時間對 RAR 4.x 及 ZIP 壓縮檔而言以兩秒精度儲存，對 RAR 5.x 則為一秒精度儲存。啟用這選項會稍微增大壓縮檔大小，但允許 WinRAR 以 0.0000001 秒精度保留檔案時間。

如果此選項是針對 ZIP 格式設定，則三種檔案時間 (修改、建立、存取) 都會以高精度儲存。跟 RAR 格式不同的是我們無法在 ZIP 中只選擇一種時間格式儲存高精度時間。

保留來源檔上次存取時間

預設的情形是來源檔案的上次存取時間在壓縮之後就會更新。如果要保留原始時間，可以啟用這選項。這個選項保留壓縮檔原始的上次存取時間，但並不控制壓縮檔儲存哪個時間戳記。例如，如果要儲存上次存取時間到壓縮檔，且保留原始檔案的上次存取時間，就必須同時使用 [儲存上次存取時間] 選項。

[包含的檔案：任何時間 / 較早於 / 較新於 / 之前 / 之後] 選項

此選項的預設值為 [任何時間]，如此 WinRAR 將壓縮全部選定的檔案，而不理會它們的時間標記。但將修改時間、建立時間、存取時間更改為 [較早於] 或 [較新於] 時，您可以強制 WinRAR 只壓縮這些較早於或較新於指定日、時和分的檔案。例如，如果您希望只壓縮最近三天被修改過的檔案時，這將非常有用。使用 [之前] 或 [之後] 選項，您可以只選擇修改時間、建立時間、存取時間在指定時間前後的檔案。

[修改時間比這新] 及 [修改時間晚於] 選項包含與指定時間完全相同的檔案，[修改時間比這舊] 及 [修改時間早於] 選項則不包含。

[設定壓縮時間為：目前系統時間 / 原來壓縮檔時間 / 最新檔案時間] 選項

此選項的預設值為 [目前系統時間]，如此每一個新建或是修改的壓縮檔案才能收受目前系統時間作為修改時間。但是您也可以設定此選項成為 [原來壓縮檔時間] 以預防壓縮檔案的時間遭到改變，或是設定為 [最新檔案時間] 來將修改時間設定為在壓縮檔案內最新檔案時間。


Brian Gladman 的 AES 作品

WinRAR 加密及解密例項使用部分 Brian Gladman 的 AES 作品，其授權條件如下：

Copyright (c) 2002, Dr Brian Gladman < >, Worcester, UK.

All rights reserved.

LICENSE TERMS

The free distribution and use of this software in both source and binary form is allowed (with or without changes) provided that:

  1. distributions of this source code include the above copyright notice, this list of conditions and the following disclaimer;
  2. distributions in binary form include the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other associated materials;
  3. the copyright holder's name is not used to endorse products built using this software without specific written permission.

ALTERNATIVELY, provided that this notice is retained in full, this product may be distributed under the terms of the GNU General Public License (GPL), in which case the provisions of the GPL apply INSTEAD OF those given above.

DISCLAIMER

This software is provided 'as is' with no explicit or implied warranties in respect of its properties, including, but not limited to, correctness and/or fitness for purpose.

本封裝的原始碼，以及其他密碼相關技術及撰寫專案相關聯結，都在 Brian Gladman 的網頁。


[壓縮選項] 對話方塊

此對話方塊結合下列指令：保護壓縮檔、建立修復記錄分割檔與鎖定壓縮檔。而這些僅支援 RAR 壓縮格式。

保護壓縮可以在壓縮檔案有些許外力損壞時，可以幫助修復它。如果您希望防止壓縮檔損壞，您需要指定佔壓縮檔案總大小的修復記錄百分比。允許的最大值為 10%，如果您設為 0，則表示不放置修復記錄。較大的修復記錄在多重連續損壞時允許有較高的修護機率，但也相對增加壓縮檔案的大小，因此 3 - 5% 應該是最佳的值。

特殊的壓縮檔案保護方法是產生修復分割檔。只有在被打開的壓縮檔案是分割檔案系列的第一個檔案時才可用，這時您只需選擇要建立的 .rev 檔案的數目。您也可以附加一個百分號到這個選項上，這樣建立的 .rev 檔案的數目將等於從 RAR 分割檔案總數獲得的這個百分比。每個修復分割檔可以重建一個遺失的分割檔案檔案。您可以從這裡獲得更多資訊。

如果您需要鎖定重要的壓縮檔以防止意外被 WinRAR 修改，請設定 [停用修改壓縮檔] 選項，壓縮檔案將會被鎖定。這指令並不能防止其他工具或其他人蓄意竄改，這只是為了預防被 WinRAR 意外修改而已。

修復分割檔比其他選項優先，且不能併用。如果您指定了非 0 的數字給 .rev 檔，WinRAR 會忽略修復記錄及壓縮鎖定參數，進而建立修復分割檔


Info-ZIP 原始碼

WinRAR 採用 Info-ZIP 小組的原始檔用來處理 ZIP 壓縮檔。原始的 Info-ZIP 原始碼可以在 ftp://ftp.info-zip.org/pub/infozip/ 及 www.info-zip.org 自由取得。

Info-Zip 授權

This is version 2009-Jan-02 of the Info-ZIP license. The definitive version of this document should be available at ftp://ftp.info-zip.org/pub/infozip/license.html indefinitely and a copy at http://www.info-zip.org/pub/infozip/license.html.

Copyright (c) 1990-2009 Info-ZIP. All rights reserved.

For the purposes of this copyright and license, "Info-ZIP" is defined as the following set of individuals:

Mark Adler, John Bush, Karl Davis, Harald Denker, Jean-Michel Dubois, Jean-loup Gailly, Hunter Goatley, Ed Gordon, Ian Gorman, Chris Herborth, Dirk Haase, Greg Hartwig, Robert Heath, Jonathan Hudson, Paul Kienitz, David Kirschbaum, Johnny Lee, Onno van der Linden, Igor Mandrichenko, Steve P. Miller, Sergio Monesi, Keith Owens, George Petrov, Greg Roelofs, Kai Uwe Rommel, Steve Salisbury, Dave Smith, Steven M. Schweda, Christian Spieler, Cosmin Truta, Antoine Verheijen, Paul von Behren, Rich Wales, Mike White.

This software is provided "as is," without warranty of any kind, express or implied. In no event shall Info-ZIP or its contributors be held liable for any direct, indirect, incidental, special or consequential damages arising out of the use of or inability to use this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the above disclaimer and the following restrictions:

  1. Redistributions of source code (in whole or in part) must retain the above copyright notice, definition, disclaimer, and this list of conditions.

  2. Redistributions in binary form (compiled executables and libraries) must reproduce the above copyright notice, definition, disclaimer, and this list of conditions in documentation and/or other materials provided with the distribution. Additional documentation is not needed for executables where a command line license option provides these and a note regarding this option is in the executable's startup banner. The sole exception to this condition is redistribution of a standard UnZipSFX binary (including SFXWiz) as part of a self-extracting archive; that is permitted without inclusion of this license, as long as the normal SFX banner has not been removed from the binary or disabled.

  3. Altered versions--including, but not limited to, ports to new operating systems, existing ports with new graphical interfaces, versions with modified or added functionality, and dynamic, shared, or static library versions not from Info-ZIP--must be plainly marked as such and must not be misrepresented as being the original source or, if binaries, compiled from the original source. Such altered versions also must not be misrepresented as being Info-ZIP releases--including, but not limited to, labeling of the altered versions with the names "Info-ZIP" (or any variation thereof, including, but not limited to, different capitalizations), "Pocket UnZip," "WiZ" or "MacZip" without the explicit permission of Info-ZIP. Such altered versions are further prohibited from misrepresentative use of the Zip-Bugs or Info-ZIP e-mail addresses or the Info-ZIP URL(s), such as to imply Info-ZIP will provide support for the altered versions.

  4. Info-ZIP retains the right to use the names "Info-ZIP," "Zip," "UnZip," "UnZipSFX," "WiZ," "Pocket UnZip," "Pocket Zip," and "MacZip" for its own source and binary releases.


Intel Slicing-by-8 CRC32 演算法

WinRAR 的 CRC32 功能採自 Intel Slicing-by-8 演算法。

原始的 Intel Slicing-by-8 程式碼可在 sourceforge.net/projects/slicing-by-8 取得，另外基於 BSD 授權條文則可自 http://www.opensource.org/licenses/bsd-license.html 取得。BSD 授權文字如下:

Copyright (c) 2004-2006 Intel Corporation.
All Rights Reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


授權及訂購資訊

請選擇下列主題中的一種：

  • WinRAR 使用授權
  • 訂購資訊
  • 給 WinRAR 1.xx - 2.50 訂購使用者的資訊


輸入密碼鑰匙

在壓縮設定檔中儲存密碼時會提示設定密碼鑰匙。您可以輸入密碼鑰匙，將註冊機碼內登記的密碼庫加密，防止未經授權的存取。之後您必須先在提示中輸入密碼鑰匙中才能使用這種壓縮設定檔。輸入完畢，密碼鑰匙在 WinRAR 關閉之前都有效。如果想知道怎麼運作，可以指定密碼鑰匙後關閉再開啟 WinRAR。輸入空字元當作密碼會將之前加密的密碼庫全部解密。

真正生效的時機在您對母視窗 [整理密碼] 按 [確定] 時才開始。關閉密碼鑰匙的提示時還沒有發生改變。


在壓縮設定檔儲存密碼

除非設定密碼鑰匙，否則存在您電腦上的密碼庫都沒有安全加密，有機會被使用您電腦的人看到。您可以輸入密碼鑰匙，將註冊機碼內登記的密碼庫加密，防止未經授權的存取。之後您必須先在提示中輸入密碼鑰匙中才能使用這種壓縮設定檔。

您可以選用跟整理密碼相同的密碼鑰匙，也可以用不同的密碼。您也可以為不同的設定檔指定不同的密碼鑰匙，只是這樣用起來比較不方便。

輸入完畢，密碼鑰匙在 WinRAR 關閉之前都有效。如果想知道怎麼運作，可以指定密碼鑰匙後關閉再開啟 WinRAR。


名稱編碼

[選項] 選單裡的 [名稱編碼] 子選單可以選擇壓縮檔名的編碼格式。此選項能用於壓縮檔瀏覽及解壓縮指令。您可以使用 Ctrl+E 鍵盤快速鍵來快速呼叫此選單。一般而言您應該會使用 [預設] 項目，讓 WinRAR 從 Windows 語言設定中選擇編碼及標準壓縮格式參數。不過如果預設選項無法滿足您，您可以選擇選單內其他的編碼。

使用者的選擇在 WinRAR 關閉或選擇其他選項之前都有效。如果您想永久儲存當前選單，則選擇 [儲存當前設定] 選單項目。請在之後會大量使用此編碼，且 WinRAR 無法自動辨識時才使用。否則預設應該是最好的選擇。您可以從選單選擇 [預設]，然後 [儲存當前設定] 來恢復設定。

如果壓縮檔包含萬國碼檔名，且 WinRAR 確認偵測到，則 WinRAR 會忽略此選單的設定而使用萬國碼。[名稱編碼] 選單使用時機只在找不到萬國碼名稱，或不確定偵測到的為何時。瀏覽一般及壓縮檔時，當此選單可用，選定的編碼頁只適用於壓縮檔名，至於一般檔名會加以忽略。


[管理設定檔案] 對話方塊

在此對話方塊，您可以編輯存在的壓縮設定檔選項或刪除它們。您無法在此建立新設定檔，建立新設定檔的方式在壓縮設定檔主題裡有敘述說明。

要編輯設定檔選項，您必須將游標移到設定檔案名稱上，然後按一下 [編輯] 按鈕並在 [設定檔參數] 對話方塊內對要改變的數值做參數設定。必須注意的是，儲存在設定檔案中的壓縮選項是不能更改的，您只能修改少數如名稱和預設狀態之類的設定檔相關選項。如果您必須修改壓縮選項，您必須建立與現有定義相同名稱的新設定檔。

要刪除設定檔，將游標先移到設定檔名稱上，然後按一下 [刪除] 按鈕

您可以按 [往上移]、[往下移] 按鈕來移動設定檔位置。

您可在此對話方塊內從設定檔清單中輕鬆的找到預設的設定檔，在它的名稱左邊會有個小型的 WinRAR 圖示 (書本)。


[組合管理面板] 對話方塊

這個對話方塊是要管理 WinRAR 介面面板。

在游標下按 [選擇] 來啟用該面板。使用 [加入] 來安裝新面板檔案。[刪除] 則從磁碟中移除在清單內游標上的面板及所屬的檔案，您就再也不能使用。

[套用到壓縮檔圖示] 選項適用於所有的面板。如果關上它，面板就只會應用在 WinRAR 的圖形上，至於 RAR,、ZIP 及其他壓縮檔的圖示不會改變。如果選用，則上述兩者的圖示都會改變。有一點跟在此對話方塊其他指令不一樣的是，您要按 [確定] 才能使 [套用到壓縮檔圖示] 選項生效。


整理密碼

[整理密碼] 對話方塊提供一個介面，能將常用的密碼集中管理，以便下次快速取用。它包含由使用者自行儲存的密碼清單。一般來說此清單包含密碼標籤與壓縮檔遮罩，但若沒有定義標籤，則 [標籤] 欄位會用密碼文字代替標籤顯示。

您可以從 WinRAR 密碼對話方塊開啟 [整理密碼] 的功能。當您輸入預設密碼或當 WinRAR 為了加密的檔案或壓縮檔向您索取密碼時，就能使用整理密碼的功能。

按一下 [加入] 按鈕可以新增密碼到清單中，位於游標的下方。這樣會打開 [密碼資訊] 對話方塊，指定密碼文字、標籤、壓縮檔遮罩。請參考 [密碼資訊] 對話方塊 取得更多此選項的說明。

[整理密碼] 對話方塊的 [刪除] 按鈕會清除所有選擇的密碼記錄。使用 [編輯] 按鈕可以修改游標之下密碼的參數。[往上移] 及 [往下移] 則改變選擇密碼的位置。

在 [整理密碼] 對話方塊中使用 [設定密碼鑰匙] 按鈕可以將儲存的密碼庫加密，保護免被未授權存取。如果儲存的密碼以密碼鑰匙保護，您必須先在密碼提示中輸入密碼鑰匙並按 [確定] 才能存取。如果輸入的密碼跟密碼鑰匙不同，就會當作給壓縮用的密碼。輸入之後，密碼鑰匙在 WinRAR 關閉前都有效。指定密碼鑰匙後您可以關閉 WinRAR 再開啟來觀察是怎麼保護的。先輸入個有效的密碼鑰匙然後再輸入空白密碼鑰匙，可以移除之前對密碼庫的加密。

如果沒有設定密碼鑰匙，所有的密碼都在註冊機碼中以未加密格式存在，因此任何可以使用您電腦的人都有辦法看到。因為整理密碼是很方便的事情，您必須一併衡量安全性的問題。如果密碼保護的資料重要且敏感，請您避免使用這功能，或者避免其他人用您的電腦，或者乾脆啟用密碼鑰匙。

[啟用自動完成功能] 選項在密碼對話方塊中使用自動完成的功能。如果輸入的第一個字元能在儲存密碼及標籤清單找到，就已經足夠讓 WinRAR 認定剩下來的完整文字，自動完成功能只能在密碼對話方塊中的顯示密碼功能啟動時才適用。如果密碼設定是隱藏，則不會出現自動完成項目。如果儲存的密碼有定義標籤，則自動完成只會針對標籤作業，不會去臆測密碼。

[整理密碼] 對話方塊中的所有設定都完成，您需要按一下 [確定] 來儲存結果。

您可以透過密碼對話方塊裡，[輸入密碼] 欄位的的下拉式選單或者自動完成的功能來存取儲存的密碼。


確認檔案覆寫

檔案已經存在，您可以自動覆寫它 ( [是] 按鈕)，跳過 ( [否] 按鈕) ，重新命名，全部重新命名，覆寫全部檔案 ( [全部皆是] 按鈕)，跳過全部已存在的檔案 ( [全部皆否] 按鈕) 或取消目前的操作。

如果您選擇全部重新命名模式，則重新命名的檔案會像 'filename(N).txt'，其中 'filename.txt' 是原始檔名，'N' 是流水號。


[設定檔案開關] 對話方塊

在此對話方塊中，您可以定義新的壓縮設定或編輯選項，包含以下項目：

設定檔案名稱

設定檔案名稱就是設定檔案的純文字敘述。它可以包含空白字元，例如：名稱「建立電子郵件附件」是有效的。命名設定檔案名稱時，建議使用比較明確的名稱，如此可簡化識別以及對它們的管理，此欄位為必填的，不能空白。

儲存壓縮檔名

如果使用此選項，在欄位指定的壓縮檔名將會被儲存在設定檔，並在選擇此設定檔時還原。如果未選用此選項，則壓縮檔名則由 WinRAR 所建議，就和平時一樣。

儲存選定的檔案名稱

如果使用此選項，在區域指定的壓縮檔名將會被儲存在設定檔，如果您往後選擇設定檔，WinRAR 將會壓縮儲存在設定檔的檔案來替代先前建立的設定檔選定的檔案。

此區域在一開始時會包含目前 WinRAR 檔案清單的檔案名稱，但您可以在此處編輯它們或者是輸入新名稱，資料夾名與萬用字元都是允許的。例如，您可以建立設定檔案包含 "C:\" 做為選定的檔名來備份整個 C: 磁碟。

如果未選用此選項，WinRAR 將會壓縮目前選定的檔案。

設定為預設設定檔

如果設定檔案被標記為預設檔案，在每次壓縮操作之前打開 [壓縮檔名和參數] 時它便會被自動的選擇。如此可以很便利的以您首選的壓縮選項的預設設定檔來建立，如此您便不需每次均設定它們。而一次只能設定一組預設設定檔。如果沒有標記為預設設定檔，壓縮對話方塊將會以標準的壓縮選項設定做為初始化值。

許多預設壓縮設定檔不只用在把檔案加到壓縮檔，也能執行修改壓縮，例如刪除檔案或檔案重新命名。在這種情況下 WinRAR 只會選擇性使用適合當下的參數。解壓縮不會套用任何再壓縮設定檔內的選項。

立即執行

如果您選取的設定檔有立即執行的選項設定，壓縮操作將會立即開始，而無法再修改壓縮設定值或壓縮檔名等。這對於例行性的壓縮操作是非常有用的；因為每次您選擇這類設定檔案時，您不需要再按一下 [確定] 按鈕。

在桌面上建立捷徑

此開關僅在啟用儲存選定的檔案名稱時有效。如果選擇，WinRAR 會在桌面上以設定檔案名稱建立圖示 (捷徑)，往後在圖示上按一下，可以輕鬆的啟用設定檔。例如，您可建立一個備份您資料的設定檔並將它加入在桌面，來簡化該項操作。

加到內容功能表

如果啟用，此設定檔名稱會顯示於檔案總管內容功能表選單，讓您能按滑鼠右鍵就啟用某設定檔。 如果您同時設定 [立刻執行] 設定檔選項，則在內容功能表選擇設定檔之後會立刻執行。 如果停用 [立刻執行]，您會先看到 [壓縮檔名稱及參數] 對話方塊。 如果啟用 [儲存壓縮檔名稱]，WinRAR 會使用儲存的名稱作為新壓縮檔。 如果啟用 [儲存選定的檔案名稱]，則儲存於設定檔的名稱及在檔案總管選取的名稱都會加到壓縮檔。


[密碼資訊] 對話方塊

[密碼資訊] 對話方塊叫用的時機為於 [整理密碼] 對話方塊按 [加入] 或 [編輯] 按鈕時發生。所以您可以指定新密碼的資訊或者編輯舊的密碼資訊。這類的資訊包括密碼文字、標籤、壓縮檔遮罩等，位於 [不經確認就接受] 選項及 [選擇適用的壓縮檔] 欄位。

密碼文字是唯一必要的欄位，必須包含要儲存的密碼。

如果您不想讓密碼直接顯示在 [密碼] 對話方塊中，可以使用 [密碼標籤] 欄位，這樣為密碼指定標籤文字，就會顯示這個標籤作為代表，下次要使用密碼只要輸入標籤就可以了。WinRAR 會自動將此標籤以密碼取代。密碼對話方塊會在密碼欄位上面以「密碼標籤輸入完畢」通知說您輸入了標籤。

例如，您可以定義密碼是 Fhtfl34Shu，密碼標籤是 home。設定完畢您就可以輸入 home，不必輸入 Fhtfl34Shu。這個功能只在密碼對話方塊有效，指令行模式及 -p[pwd] 開關並不適用。

密碼標籤一定要獨特，不可以跟其他的密碼或密碼標籤重複。密碼標籤是不分大小寫的，所以 home 跟 Home 會認定為相同的標籤。

如果您同時定義密碼文字及標籤，則標籤會顯示在 [整理密碼] 對話方塊內的標籤欄位。如果只定義密碼，則密碼會顯示於清單中。

[選擇適用的壓縮檔] 欄位可以包含多個壓縮檔名稱或遮罩 (僅限名稱，沒有路徑)，以空白字元區隔。如果壓縮檔名包含空白字元，則必須用雙引號括起來。如果要解開的壓縮檔符合遮罩定義，WinRAR 會自動從「密碼文字」中的定義自動選取。如果停用 [不經確認就接受] 選項，此密碼對話方塊中的密碼會視為預設值，而使用者有機會修改。如果使用 [不經確認就接受] 選項，會立刻接受密碼。

例如，如果您指定密碼文字為 MailDGWT58 而且在 [選擇適用的壓縮檔] 欄位指定為 mymail*.rar mymail*.zip，則會在解開 mymail*.rar 及 mymail*.zip 等壓縮檔時，密碼對話方塊自動選擇 MailDGWT58 作為密碼。此功能只針對解壓縮，不作用於壓縮上。

請注意儲存的密碼為明碼，儲存於註冊機碼中。所以任何能使用您電腦的人都有機會看見。這個整理密碼的功能主要是方便密碼的授予，您必須自行權衡安全性的風險。如果密碼保護的內容是機密或敏感，請考慮不要使用本功能，或避免非授權使用您的電腦。


WinRAR 1.xx - 2.50 訂購使用者資訊

WinRAR 及 Rar 的 Linux 版本 2.60 級以上版本有新的訂購方式，非常高安全性的，憑證驗證註冊封印。主要優點是在註冊碼的新憑證驗證碼強化了許多，特別是用在原始壓縮檔封印識別的時候。

很不幸的，這也代表了舊的註冊碼檔案將無法在最新的已更改註冊碼的 Rar-Linux 及 WinRAR 上作業。請您寫封信給我們並儘可能附上原始購買的資料 (例如註冊碼、使用者名稱、大約購買日期等等)，請不要拿破解碼來測試，由於需要人工核對，破解碼是沒有用的。


[尋找結果] 對話方塊

此對話方塊包含在尋找檔案指令中找到的項目。您可以選擇一或多個檔案，然後按 [解壓縮至] 來解壓縮。您也可以按 [檢視] 來檢視游標下的檔案，或者按 [尋找] 來游標移到 WinRAR 主視窗裡面的該檔案上。

因為技術的限制，開始搜尋時找到檔案的操作可能有點延遲。WinRAR 只會在關閉目前處理中的壓縮檔才會處理本指令。


[進階自解檔選項] 對話方塊

此對話方塊可利用從把壓縮檔案轉換成自解檔格式指令，然後按一下 [進階自解檔選項] 按鈕啟動。它允許指定一些自解檔壓縮檔的選項，如預設目標路徑，視窗標題和純文字。它會使用在 Windows 自解檔模組主題所敘述的自解檔指令碼指令，自動生成指令碼。因此您不需要學習指令碼語言和自己輸入指令，只需要設定想要的選項即可。

請注意這些自解檔選項僅能夠應用在 Windows 圖形介面模組，而不支援指令行或非 Windows 自解檔程式。

此對話方塊的自解檔選項被結合成一個子對話方塊，敘述如下：

  • 自解檔選項：一般設定
  • 自解檔選項：安裝
  • 自解檔選項：模式
  • 自解檔選項：進階設定
  • 自解檔選項：更新
  • 自解檔選項：文字及圖示
  • 自解檔選項：授權
  • 自解檔選項：模組


自解檔指令：Delete

Delete=<檔案名稱>

在解壓縮到目標資料夾之前刪除指定的檔案，允許數個 Delete 指令。

如果在此指定的檔案被鎖定而無法刪除，自解檔模組在解壓縮前會試著將它臨時重新命名，並在 Windows 重新啟動時刪除它，這能不能成功則取決於 Windows 版本的差異。

範例：

Delete=winrar95.exe

Delete=rarlng.dll


自解檔指令：License

License=<使用授權協議對話方塊標題>

{

使用授權協定文字 1

使用授權協定文字 2

...

}

當開始自解檔時，顯示軟體的使用授權協定，使用者可以接受，並繼續解壓縮，或拒絕並離開。

License 可以是 HTML 格式或純文字格式。後者自解檔模組會配合對話方塊將指定純文字字串結合和重新格式成最佳狀態，因此如果您希望開始新段落的話，您必須在之前加入一個空字串。

使用 HTML 可以控制顯示的字形、顏色及格式。關於 HTML 的語法在一般網際網路都找得到，或者您也可以用 HTML 編輯程式製作。

如果文字內容由許多行組成，自解檔模組會認為 '}' 字元為整個文字區塊的終點，所以請不要將此符號放在一行的最前面。如果您真的需要把 '}' 字元放在最前面，請在前面再加個空格。

範例：

License=使用者使用授權協議書

{

所有版權於 RAR 均屬於作者所專有。

此程式是共享軟體，任何人在測試期限內均可以使用此軟體。

在測試期限過後，您必須購買。

}


自解檔選項：進階設定

這個對話方塊是 [進階自解檔選項] 對話方塊的一部分，包含下列設定：

在目標資料夾中要刪除的檔案

解壓縮前，自解檔程式會試著刪除所指定的檔案或在目標資料夾內的檔案。您可以在此輸入超過一個以上的檔案，要如此做時，檔案名稱之間必須以空格分隔。

如果在此指定的檔案被鎖定而無法刪除，自解檔模組在解壓縮前會試著將它臨時重新命名，並在 Windows 重新啟動時刪除它，這能不能成功則取決於 Windows 版本的差異。

相對的自解檔指令碼指令 - Delete

捷徑

解壓縮後為被壓縮檔案建立捷徑。按 [加入捷徑] 按鈕來定義新的捷徑。您可以在捷徑指令碼指令參考更多捷徑參數。[加入捷徑] 按鈕下方列出已經指定的捷徑清單，您也可以加以編輯。

相對的自解檔指令碼指令 - Shortcut

要求以系統管理員身分存取

如果您要此自解檔在 Windows Vista 及更新版本中執行時會要求以系統管理員身分存取，則設定此選項。此選項不會改變在舊版 Windows 中的行為。

相對的指令行開關為 -iadm


自解檔開關：一般設定

自解檔選項：一般設定

這個對話方塊是 [進階自解檔選項] 對話方塊的一部分，包含下列設定：

解壓縮路徑

設定要解壓縮檔案的預設目標路徑。您可以選擇要將它建立在使用者的 Program Files 資料夾，或目前資料夾，或在此指定一個絕對路徑。前兩種情況不需要包含磁碟機號或首碼的 '\' 反斜線字元，而第三個則必須要有。

相對的自解檔指令碼指令 - Path

解壓縮路徑/儲存及修復路徑

這個選項允許自解檔儲存使用者自訂的目的地路徑至登錄資料，在下次執行自解檔時沿用解壓縮路徑內容值。 原始 Path 指令值放在目的地路徑輸入欄位相關的地方，所以使用者可以選用原始路徑或上次路徑。

這個功能在安裝新版本或升級某些軟體到同一資料夾時很有用。這讓習慣修改路徑的使用者很方便。

這指令只能與非空白的指令解壓縮路徑欄位共用。

相對的自解檔指令碼指令 - SavePath

儲存目前的設定值為預設值

這個按鈕只有在轉換壓縮檔至自解檔指令中叫用 [進階自解檔選項] 時才會顯示。這會儲存在此對話方塊中所有的選項。此儲存的設定只會應用在轉換壓縮檔至自解檔時。至於其他壓縮檔變更指令則使用預設的壓縮設定檔。


自解檔開關：授權

自解檔選項：授權

這個對話方塊是 [進階自解檔選項] 對話方塊 的一部分，包含下列設定：

使用授權視窗標題

設定指定的純文字作為使用授權視窗標題。

相對的自解檔指令碼指令 - License

授權說明

當開始自解檔時，顯示指定的純文字作為軟體使用授權說明。使用者可以接受並繼續解壓縮操作，或拒絕並離開。

授權文字可以是 HTML 或純文字。如果是後者，自解檔模組會配合對話方塊將指定純文字字串結合和重新格式成最佳狀態，因此如果您希望開始新段落的話，您必須在之前加入一個字串。

使用 HTML 可以控制顯示的字形、顏色及格式。關於 HTML 的語法在一般網際網路都找得到，或者您也可以用 HTML 編輯程式製作。

從檔案載入文字

載入選定檔案的文字做為自解檔視窗文字。

相對的自解檔指令碼指令 - License


自解檔選項：模式

這個對話方塊是 [進階自解檔選項] 對話方塊的一部分，包含下列設定：

暫存模式/解封裝至暫存資料夾

此選項強制自解檔程式建立一個暫存資料夾，然後將所有檔案解壓縮到資料夾，開始執行在安裝程式/解壓縮後執行區域所指定的程式，並在安裝程式完成後刪除暫存資料夾中的所有內容。當執行這些操作時，自解檔程式會自動使用「隱藏啟動對話方塊」安靜模式 (下面說明)，但您可以利用指定「全部隱藏」安靜模式來凌駕設定。安裝程式則認定當前資料夾為含有解壓縮檔案的暫存資料夾。

您可以設定兩組選用的字串參數，定義解壓縮之前的問題及問題的標題。這個情況下只有使用者按 [是] 之後才會開始解壓縮。

如果有設定 [解壓縮檔案到暫存資料夾]，您亦可同時指定安裝程式。在此模式自解檔忽略解壓縮路徑參數。

如果比子處理緒還早結束，此選項可能在安裝程式無法進行。詳情請參閱 TempMode。

相對的自解檔指令碼指令 - TempMode

安靜模式

預設自解檔在開始解壓縮前會先詢問確認，並允許使用者更改目標資料夾。如果您設定 [安靜模式] 的 [隱藏啟動對話方塊]，這時會跳過確認畫面。如果您也希望隱藏版權對話方塊及解壓縮過程的話，請選擇 [全部隱藏]。

相對的自解檔指令碼指令 - Silent


自解檔選項：模組

這個對話方塊是 [進階自解檔選項] 對話方塊 的一部分，允許選擇自解檔模組。 注意並不是所有的模組都支援進階自解檔選項。它們只被 Windows 圖形介面 RAR 和 ZIP 模組 (Default.SFX 和 Zip.SFX) 支援，而不被 Windows 平台 RAR 模組 (WinCon.SFX) 支援。

This dialog is a part of the "Advanced SFX options" dialog and allows to choose a self-extracting module. Note that not all modules support advanced SFX options. They are supported by GUI RAR and ZIP modules (Default.SFX and Zip.SFX), but not by console RAR module (WinCon.SFX).


自解檔選項：安裝

此對話方塊為 [進階自解選項] 對話方塊 的成員，包含以下功能:

安裝程式/解壓縮之後執行

自解檔在完成解壓縮後會嘗試執行指定的程式。執行程式之前會將含有解壓縮檔案的資料夾設為預設值。如果名稱含有空白，則須用雙引號括起來。

這裡可以指定多個安裝程式，一個程式寫一行。如果不想同時執行所有程式，請啟用 [等候並回傳結束代碼] 選項。

請參閱安裝取得近一步資訊。

相對應的自解檔指令碼指令 - Setup

安裝程式/解壓縮之前執行

自解檔會嘗試在解壓縮之前執行指定的程式，因此該程式必須已經在磁碟上。在解壓縮之前目標設定為當下之資料夾。如果名稱含有空白，則須用雙引號括起來。舉例來說，您可能會使用此指令於安裝新程式於舊程式之上時。

這裡可以指定多個程式，一個程式寫一行。自解檔等待每個程式結束才會開啟下一個程式，或者繼續解壓縮。

相對應的自解指令檔指令 - Presetup

安裝程式/等候並回傳結束代碼

如果開啟此選項，自解檔會等每個安裝程式依序完成，開始解壓縮，然後將程式的結束代碼當作是自解檔的結束代碼。如果自解檔因為發生錯誤無法執行安裝程式，則會傳會自己的結束代碼，跟 WinRAR 結束代碼定義的一樣。要調整傳回碼則參照「調整結束代碼」參數。

安裝程式/調整結束代碼

既然安裝程式與自解檔能用相同的結束代碼來定義事件變數，「調整結束代碼」參數能讓代碼對應不同的領域。如果是正整數，則代表安裝程式的結束代碼，讓自解檔回傳碼照舊。如果是負整數，其絕對值代表自解檔的結束代碼，安裝程式回傳碼照舊。如果是 0 則安裝及自解檔結束代碼都照舊。

進一步資訊您可以參考 SetupCode 主題。

相對應的自解指令檔指令 - SetupCode


自解檔選項：文字及圖示

這個對話方塊是 [進階自解檔選項] 對話方塊的一部分，包含下列設定：

自解檔視窗標題

設定指定的純文字作為自解檔視窗的標題。

相對的自解檔指令碼指令 - Title

自解檔視窗標題

在自解檔視窗加入指定的純文字或 HTML 到文字顯示視窗。

自解檔模組會配合對話方塊將指定純文字字串結合和重新格式成最佳狀態，因此如果您希望開始新段落的話，您必須在前面放置一個空字串。

使用 HTML 可以控制顯示的字形、顏色及格式。關於 HTML 的語法在一般網際網路都找得到，或者您也可以用 HTML 編輯程式製作。

相對的自解檔指令碼 指令- Text

從檔案載入文字

載入選定檔案的文字做為自解檔視窗文字。

從下列檔案載入自解檔標誌

給建立或更新的自解壓縮檔指定點陣圖檔 (*.png) 作為顯示的標誌。

預設的自解檔標誌大小是 93x302 像素。建議您使用相同或更小的點陣圖。

使用這個選項，不能搭配其他壓縮程式的自解檔模組。

相對應的指令行為 -iimg

從檔案載入自解檔縮檔案圖示

將準備的圖示替代自解檔預設的圖示。使用這個選項，不能搭配其他壓縮程式的自解檔模組。

相對應的指令行開關為 -iicon


自解檔選項：更新

這個對話方塊是 [進階自解檔選項] 對話方塊的一部分，包含下列設定：

更新模式/解壓縮並取代檔案

解壓縮所有檔案，不管檔案時間。

更新模式/解壓縮並更新檔案

解壓縮檔案，僅複製不存在目標資料夾的檔案或比目前新的檔案。

對應之自解檔指令檔指令 - Update=U

更新模式/僅更新已經存在的檔案

解壓縮檔案，僅處理複製已經存在目標資料夾的、而且比目前新的檔案。如果檔案不存在於目標資料夾則會跳過不處理。

對應之自解檔指令檔指令 - Update=F

覆寫模式/覆寫前先詢問 (預設)

覆寫檔案前先詢問。

覆寫模式/覆寫所有檔案

覆寫檔案前不詢問。

對應之自解檔指令檔指令 - Overwrite=1

覆寫模式/略過已經存在的檔案

不要覆寫已經存在的檔案。

對應之自解檔指令檔指令 - Overwrite=2


自解檔指令：Overwrite

Overwrite=[n]

如果 [n] 為 0，在覆寫檔案之前使用者將先被詢問。這是覆寫指令的預設動作，可以不需要指定。如果 [n] 不存在或是等於 1，檔案將在沒有確認的狀況下全部覆寫。如果 [n] 等於 2，所有已存在的檔案將不會被覆寫。

範例：

Overwrite=1


自解檔指令：Path

Path=<路徑>

設定預設的目標路徑。絕對路徑的起始點在預設下為 <磁碟機編號>:，如果 <路徑> 只包含名稱，它將會被附加到 Program Files 資料夾下，如果您不希望這麼做，請從 '.\' 字元開始定義起始 <路徑>。

範例：

  1. 設定預設路徑為 "Program Files\Calc 3.05"：

Path=Calc 3.05

  2. 設定 [C:\Calc] 當作預設路徑：

Path=C:\Calc

  3. 設定以此目錄為基準，底下 [Calc] 當作預設路徑：

Path=.\Calc

註解

  1. 可以在 %varname% 指定系統環境變數格式於 Path 變數中。例如："Path=%APPDATA%\MyApp"，自解模組會自動解壓縮。變動環境變數如 %date% 或 %random% 則不會解開。
  2. 自解檔模組設定 sfxstime 環境變數，包含以 "YYYY-MM-DD-HH-MM-SS-ms" 格式為模組開始時間。如果您希望建立以時間為變數的專屬路徑，可以將此指令指定在 Path 指令，例如 "Path=myapp-%sfxstime%"。


自解檔指令：Presetup

Presetup=<程式>

自解檔在解壓縮之前將試著執行 <程式>，因此<程式>必須已存在磁碟中。在執行 <程式> 之前必須先指定目標資料夾。您可以使用此指令，比如說，當安裝新版本於舊版本上面時，用以移除先前的程式版本。

範例：

Presetup=uninstall.exe /clean

備註

  1. 自解檔遇到壓縮檔註解不包含 Setup 或 Presetup 指令時，會顯示「解壓縮」而非「安裝」。如果您仍屬意出現「安裝」文字，可以在註解加入不含參數的 Setup 指令。


自解檔指令：指令碼範例

下面指令碼設定對話方塊標題為 Calculator 3.05，更改對話方塊的顯示文字，設定預設的解壓縮路路徑為 Program Files\Calculator，啟用覆寫現有檔案並在解壓縮所有檔案後執行 Setup.exe。

Title=Calculator 3.05

Text

{

Calculator 是共享軟體，任何人都可在 40 天

的評估試用期間內使用此軟體。

在超過測試期限之後，如果您希望繼續使用

Calculator 的話，您必須購買。

}

Path=Calculator

Overwrite=1

Setup=setup.exe


自解檔指令：SavePath

SavePath

這個指令允許自解檔儲存使用者自訂的目的地路徑至登錄資料，在下次執行自解檔時沿用 Path 指令上的值。 原始 Path 指令值放在目的地路徑輸入欄位相關的地方，所以使用者可以選用原始路徑或上次路徑。

這個功能在安裝新版本或升級某些軟體到同一資料夾時很有用。這讓習慣修改路徑的使用者很方便。

SavePath 指令只能與 Path 指令共用。

範例:

Path=Calc 3.05

SavePath


自解檔指令：Setup

Setup=<程式>

在成功解壓縮之後自解檔將會試著執行 <程式>。在執行 <程式> 之前，包含已解壓縮檔的資料夾將會設為目前資料夾

範例：

Setup=setup.exe

注意

  1. 如果您在使用自解檔執行 InstallShield setup.exe 有問題的話，請試著執行 [setup.exe /SMS] 來代替簡單的 setup.exe。此開關允許自解檔檢測安裝程式是否結束。
  2. 如果 Setup 指定的應用程式不含參數，您可以使用 -sp<參數> 自解檔指令行開關來傳遞選用的參數至程式。
  3. 自解檔模組在執行安裝程式之前會設定 sfxname, sfxcmd 及 sfxpar 環境變數。sfxname 變數包含自解檔名稱。sfxcmd 變數包含從自解檔模組接收到的完整指令行。此指令的第一個參數為自解檔模組名稱。sfxpar 只包含指令行參數，不包含引導的自解模組名稱。安裝程式在需要的時候能讀取這些變數。同時您可以指定延伸的 %variable% 作為參數，例如 "Setup=setup.exe %sfxpar%".
  4. 自解檔遇到壓縮檔註解不包含 Setup 或 Presetup 指令時，會顯示「解壓縮」而非「安裝」。如果您仍屬意出現「安裝」文字，可以在註解加入 Setup=<> 指令。或者如果您透過 自解檔選項 圖形介面對話方塊定義自解檔，只要指定 <> 作為安裝程式的名稱就可以了。如次一來自解檔模組會修改按鈕文字，但不會試圖執行程式。


自解檔指令：SetupCode

SetupCode[=參數]

如果出現此指令，自解檔會等候在 Setup 或 Presetup 定義中的程式執行完畢，並傳回自解檔結束代碼。

如果自解檔因為發生某些錯誤無法傳回結束代碼，就會傳回自己的錯誤碼，即與 WinRAR 結束代碼 相同。

既然安裝程式與自解檔能用相同的結束代碼來定義事件變數，「調整結束代碼」參數能讓代碼對應不同的領域。

如果參數是正整數，則代表安裝程式的結束代碼，讓自解檔回傳碼照舊。

如果參數負整數，其絕對值代表自解檔的結束代碼，安裝程式回傳碼照舊。

如果參數 0，則安裝及自解檔結束代碼都照舊。

如果省略參數，則假設為 1000，因此 "SetupCode" 跟 "SetupCode=1000" 是一樣的。

假設我們下 "SetupCode=1000" 指令。如果自解檔執行安裝失敗，則自解檔會回傳自己小於 1000 的錯誤代碼，例如 3，給校驗錯誤。如果自解檔完成啟動安裝程式，且沒有產生錯誤代碼，則自解檔會回傳 1000。如果安裝程式回傳 10，則自解檔回傳 1010。

如果我們用負整數 "SetupCode=-1000" 指令，則自解檔傳回 1003 給校驗錯誤。0 代表安裝程式回傳 0，10 表示安裝程式回傳 10。

如果同時使用多個 Setup 及 Presetup 指令，且也出現 SetupCode，自解檔會等候每個 Setup 及 Presetup 指令完成，然後傳回安裝程式傳遞的大量結束代碼。

範例

Setup=setup.exe

SetupCode


自解檔指令：shortcut

shortcut=<目標類型>,<來源名稱>,<目標資料夾>,<敘述>,<捷徑名稱>,<捷徑圖示>

為解壓的檔案建立一個捷徑。

目標類型是目標區域種類，可以有下列值：

D | 在桌面建立捷徑
P | 在 [開始] 功能表/[程式集] 中建立捷徑
T | 在 [啟動] 功能表中建立捷徑

SrcName是壓縮檔名稱。如果是執行檔，您還可以在名稱後面後面加用引號包好的參數。

DestFolder是建立捷徑的資料夾，如果它不存在，將被自我解壓縮檔建立。

Description是敘述捷徑的字串。

ShortcutName是由自解檔建立的 .lnk (捷徑) 檔案的檔案名稱。

ShortcutIcon是關聯給捷徑的圖示名稱。如果沒有此參數，則會使用預設圖示。如果圖示檔名沒有包含完整路徑，則自解檔會從解壓縮的資料夾中尋找圖示檔。

所有選項用逗號分隔。如果您需要在選項內加入逗號字元，就把整個選項加上引號。如果您要顯示引號，則必須打兩次引號。只有目標類型和來源名稱是必需的，其他選項選用，可以忽略或留空白。

範例：

1. 在桌面建立在 WinRAR 資料夾中連接到 winrar.exe 的捷徑，帶有 [WinRAR 執行檔] 的敘述和 [WinRAR 壓縮軟體] 的名稱，並附帶圖示 winrar.ico：

Shortcut=D, winrar.exe, WinRAR, "WinRAR 執行檔", "WinRAR 壓縮軟體", winrar.ico

2. 給 rar.exe 提供其他參數，省略 DestFolder 及 ShortcutIcon 參數：

Shortcut=D, "rar.exe" a -ag c:\mydata\backup\daily c:\mydata\files, , Daily backup, Backup


自解檔指令：Silent

Silent[=參數]

開始解壓縮時不顯示起始對話方塊。

參數可以是 1 或 2。

如果參數是 1，開始解壓縮對話方塊會完全隱藏，包含進度顯示和檔案名稱。同時在此模式自解檔不會顯示 [版權] 對話方塊。

如果參數是 2，則跳過開始解壓縮的確認，但使用者仍然可以看到壓縮檔案的解壓縮進程。

範例：

Silent=2


自解檔指令：TempMode

TempMode=[問題敘述][,標題]

此指令強制自解檔建立一個臨時目錄，將全部檔案解壓縮至此，然後開始執行 Setup 指令所指定的程式，並在完成 Setup 程式之後將臨時目錄中的內容全部清除。當執行這些操作時，自解檔會自動設定安靜模式為 2 來跳過啟動對話方塊，但您可以指定 Silent 指令加上其他的參數來凌駕原先設定。安裝程式會採用含有解壓縮檔的暫存資料夾為當前資料夾。

TempMode 指令容許有選用字串的參數，在解壓縮之前可用以定義問題和問題的標題。這樣的範例，僅在當使用者選擇 [是] 按鈕時才會開始解壓縮。

如果 TempMode 指令存在的話，指令碼必須要有 Setup 指令。在此模式會忽略 Path 指令。

在 TempMode 自解檔需要偵測安裝程式執行完畢才能刪除暫存檔。要是安裝程式在程式安裝完畢之前還在，那就沒有甚麼問題。但有時候安裝程式起始子執行續然後就結束，希望自執行緒會安裝完畢。這種情況之下自解檔會在偵測到主要安裝程式結束後立刻刪除暫存檔，造成子執行緒失去功能。因此要 TempMode 能正常運作的話，必須確保這些程序不會引發別的程序，或者設法在所有子執行緒結束之前不要結束。

範例：

a) TempMode

b) TempMode=您希望繼續安裝小算盤 3.05 嗎?, 小算盤安裝程式


自解檔指令：Text

此指令支援兩種語法版本：

Text=<字串>

Text

{

字串 1

字串 2

...

}

加入指定純文字或 HTML 字串到自解檔模組的文字輸出視窗。當自解檔模組第一次遇到 Text 指令時，它會重置此視窗在加入 <字串> 之前的預設內容，後續指令則附加 <字串> 到已存在的純文字後。

這種指令語法可以一次加入單行字串或數行字串。

如果使用純文字語法時，自解檔模組會配合對話方塊將指定純文字字串結合和重新格式化成最佳狀態，因此如果您希望開始新段落的話，您必須在之前加入一個空字串。

使用 HTML 可以控制顯示的字形、顏色及格式。關於 HTML 的語法在一般網際網路都找得到，或者您也可以用 HTML 編輯程式製作。

如果文字內容由許多行組成，自解檔模組會認為 '}' 字元為整個文字區塊的終點，所以請不要將此符號放在一行的最前面。如果您真的需要把 '}' 字元放在最前面，請在前面再加個空格。

範例：

  1. 加入單一字串到對話方塊視窗

Text=這是我的新程式

  2. 加入指定純文字到對話方塊視窗

Text

{

此程式最有趣的特性是：

- 支援 Windows 剪貼簿；

- 每一個處理的檔案大小最大為 10KB；

}


自解檔指令：Title

Title=<標題>

設定自解檔的視窗標題。

範例：

Title=Calculator, version 3.05


自解檔指令：Update

Update=<c>

<c> 參數可以為 U 或 F 字元。

如果 <c> 為 U，自解檔模組會解壓縮檔案，複製不存在的檔案，以及複製比較新的檔案。

如果 <c> 為 F，自解檔模組會解壓縮檔案，複製比較新的檔案。如果檔案並不存在於目標資料夾，則檔案不會於 F 模式中解壓縮。

範例

Update=U


開關：-ISND[-] - 控制通知音效

使用 -isnd 開啟通知音效，-isnd- 停用通知音效。


選擇工具列按鈕

在此對話方塊您可以指定當瀏覽磁碟資料夾 ( [在壓縮檔案外部時顯示] 選項之群組) 或檢視壓縮檔案內容 ( [在壓縮檔案內部時顯示] 選項之群組) 時，要顯示哪一些工具列按鈕。可以改變按鈕的順序，只要選擇您希望移動的按鈕並按 [往上移] 或 [往下移] 來改變它們的位置。如果您要修復預設工具列設定，按 [預設] 按鈕。

[分隔線] 按鈕會在目前選擇的按鈕前插入分隔線。如果您要移除分隔線，可以取消選取，或將游標放在上面，然後按 [分隔線] 按鈕。

您也可以在按 ALT 鍵時在工具列上直接拖曳工具列按鈕。