منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب
مشروع ضغط وفك ضغط الملفات zip/Unzip files [عادل] - نسخة قابلة للطباعة

+- منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب (http://vb4arb.com/vb)
+-- قسم : قسم لغة الفيجوال بيسك VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=182)
+--- قسم : قسم مكتبة اكواد VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=185)
+--- الموضوع : مشروع ضغط وفك ضغط الملفات zip/Unzip files [عادل] (/showthread.php?tid=13699)

الصفحات: 1 2 3 4 5


RE: مشروع ضغط وفك ضغط الملفات zip/Unzip files [عادل] - الشاكي لله - 06-11-15

هناك كلاس كتبته قبل سنتين لضغط الملفات باستعمال بارمترات الوين رار كونسول

اذا كنت تريده اخبرني


RE: مشروع ضغط وفك ضغط الملفات zip/Unzip files [عادل] - adel27 - 06-11-15

أشكرك على مرورك يا غالي
نعم أحتاجه
إذا كان بلغة الفجوال بيسك


RE: مشروع ضغط وفك ضغط الملفات zip/Unzip files [عادل] - الشاكي لله - 07-11-15

ولا يهمك دقائق بس اضبط الكلاس واحوله للفيجوال بيسك

لان الكلاس محتاج تعديل بحكم انه كان مخصص لشغلة معينة

سؤال : هل تريد الملف الناتج المضغوط يكون عبارة عن rar ولا zip ?


RE: مشروع ضغط وفك ضغط الملفات zip/Unzip files [عادل] - adel27 - 07-11-15

zip 

الله لا يهينك بس ياليت تسـوي لي شرح للأكواد داخل الكلاس الله لا يحرمني منك يا غالي


RE: مشروع ضغط وفك ضغط الملفات zip/Unzip files [عادل] - الشاكي لله - 07-11-15

اذا كان بدك zip
اذن يمكننا الاستعانة بخدمات برنامج 7z افضل
لان يوجد كلاس جاهز من الشركة للاستعمال المباشر من السي شارب
الي جانب ان ذلك سيوفر لنا ProgressChanger callback ، بينما الوين رار لايمكننا الاستعلام عن تقدم الضغط بسبب ان الطريقة تتم بالcommand line

انتظرني ساعتين بالكثير


RE: مشروع ضغط وفك ضغط الملفات zip/Unzip files [عادل] - الشاكي لله - 07-11-15

للاسف كلاسات الشركة معقدة قليلا

فهي لاتحتوي على دوال مباشرة للضغط او الاستخراج ، بل تحتوي دوال Encoder و Decoder لتشفيرات معينة
هذه التشفيرات هي عبارة عن خوارزميات لضغط الملفات وتقليل حجمها

اي انها اللب الحقيقي لبرنامج 7z .

المشكلة ان هذه الكلاسات بدائية جدا كما قلت فناتج الEncoder هو مجرد ملف مشفر قليل الحجم وليس archive بصيغة zip

ربما استطيع تعديل اكواد الـ Encoder و Decoder بحيث تدعم تشفير اكثر من ملف واحد في نفس الوقت والناتج يكون ملف مشفر ببنود خاصة اضعها ، بمعنى اخر (الناتج لن يكون ملف zip)

هل يجب ان تكون الملفات المضغوطة بصيغة zip ؟
ولا انك تريد الضغط والاستخراج فقط مهما كانت الصيغة ؟

للعلم . هذه هي تشفيرة LZMA التي اقوم بالعمل عليها
http://www.7-zip.org/sdk.html

من هذا عرفنا ان برنامج 7z في الحقيقة ماهو الا واجهة يستعمل تشفيرات زي LZMA و LZ


RE: مشروع ضغط وفك ضغط الملفات zip/Unzip files [عادل] - أبو عمر - 07-11-15

قبل سنوات احتجت للضغط في أحد البرامج فما كان امامي الا استخدم الملف المساعد مع ارار Rar.Exe
والغضط يكون على سبيل المثال
rar "ic=first level" -r c:\*.rar *.txt
وستجد في مجلد winRar ملف نصي هذا محتواه
PHP كود :
Welcome to the RAR Archiver!
                       -=-=-=-=-=-=-=-=-=-=-=-=-=-=

 
Introduction
 
~~~~~~~~~~~~

    
RAR is a powerful tool allowing you to manage and control archive
  files
Console RAR supports archives only in RAR formatthe names
  of which usually have a 
".rar" extensionZIP and other formats
  are not supported
Windows users may install GUI RAR version WinRAR,
  
which is able to process many more archive types.

  
RAR features include:

    *  
Highly sophisticatedoriginal compression algorithm
    
*  Special compression algorithms optimized for textaudio,
       
graphics data32 and 64-bit Intel executables
    
*  Better compression than similar toolsusing 'solid' archiving
    
*  Authenticity verification (registered version only)
    *  
Self-extracting archives and volumes (SFX)
    *  
Ability to recover physically damaged archives
    
*  Lockingpasswordfile order list, file security more ...


 
Configuration file
 
~~~~~~~~~~~~~~~~~~

  
RAR for Unix reads configuration information from the file .rarrc
  in the user
's home directory (stored in HOME environment variable)
  or in /etc directory.

  RAR for Windows reads configuration information from the file rar.ini,
  placed in the same directory as the rar.exe file.

  This file may contain the following string:

  switches=any RAR switches, separated by spaces

  For example:

  switches=-m5 -s


 Environment variable
 ~~~~~~~~~~~~~~~~~~~~

    Default parameters may be added to the RAR command line by establishing
    an environment variable "RAR".

    For instance, in Unix following lines may be added to your profile:

      RAR='
--md1024'
      export RAR

    RAR will use this string as default parameters in the command line and
    will create "solid" archives with 1024 KB sliding dictionary size.

    RAR handles options with priority as following:

       command line switches                   highest priority
       switches in the RAR variable            lower priority
       switches saved in configuration file    lowest priority


 Log file
 ~~~~~~~~

  If the switch -ilog is specified in the command line or configuration
  file, RAR will write informational messages, concerning errors
  encountered while processing archives, into a log file. Read switch
  -ilog description for more details.


 The file order list for solid archiving - rarfiles.lst
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  rarfiles.lst contains a user-defined file list, which tells RAR
  the order in which to add files to a solid archive. It may contain
  file names, wildcards and special entry - $default. The default
  entry defines the place in order list for files not matched
  with other entries in this file. The comment character is '
;'.

  In Windows this file should be placed in the same directory as RAR
  or in %APPDATA%\WinRAR directory, in Unix - to the user'
s home directory
  
or in /etc.

  
Tips to provide improved compression and speed of operation:

  - 
similar files should be grouped together in the archive;
  - 
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 higher
  priority regardless of its position in the 
list. For example, if you have
  
*.cpp and f*.cpp masksf*.cpp has a higher priorityso the position of
  
'filename.cpp' will be chosen according to 'f*.cpp'not '*.cpp'.


 
RAR command line syntax
 
~~~~~~~~~~~~~~~~~~~~~~~

 
Syntax

    RAR 
<command>  [ -<switches> ]  <archive>  [ <@listfiles...> ]
        [ <
files...> ]  [ <path_to_extract\> ]

 
Description

    Command line options 
(commands and switchesprovide control of
    creating 
and managing archives with RARThe command is a string (or a
    single letter
which commands RAR to perform a corresponding action.
    
Switches are designed to modify the way RAR performs the actionOther
    parameters are archive name 
and files to be archived into or extracted
    from the archive
.

    
Listfiles are plain text files that contain names of files to process.
    
File names should start at the first columnIt 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:

       
rar a backup @backup.lst

    
If you wish to read file names from stdin (standard input),
    
specify the empty listfile name (just @).

    
By default, Windows console RAR uses OEM (DOSencoding in list files.
    
but it can be redefined with -sc<charset>switch.

    
You may specify both usual file names and list files in the same
    command line
. If neither files nor listfiles are specified,
    
then *.* is implied and RAR will process all files

    In Unix you need to enclose RAR command line parameters containing
    wildcards in single 
or double quotes to prevent their expansion
    by Unix shell
. For examplethis command will extract *.asm files
    from all 
*.rar archives in current directory:

       
rar e '*.rar' '*.asm'


    
Command could be any of the following:

    
a       Add files to archive.

            
Examples:

            
1add all *.hlp files from the current directory to 
            the archive help
.rar:

            
rar a help *.hlp

            2
archive all files from the current directory and subdirectories
            to 362000 bytes size solid
self-extracting volumes 
            
and add the recovery record to each volume:

            
rar a --v362 --sfx -rr save

            Because no file names are specified
all files (*) are assumed.

            
3) as a special exception, if directory name is specified as 
            
an argument and if directory name does not include file masks 
            
and trailing backslashesthe entire contents of the directory
            
and all subdirectories will be added to the archive even 
            
if switch -r is not specified.

            
The following command will add all files from the directory
            Bitmaps 
and its subdirectories to the RAR archive Pictures.rar:
            
            
rar a Pictures.rar Bitmaps

            4
) if directory name includes file masks or trailing backslashes,
            
normal rules apply and you need to specify switch -r to process 
            its subdirectories


            
The following command will add all files from directory Bitmaps,
            
but not from its subdirectoriesbecause switch -r is not
            specified
:

            
rar a Pictures.rar Bitmaps\*


    
c       Add archive commentComments are displayed while the archive is
            being processed
Comment length is limited to 62000 bytes

            Examples
:

            
rar c distrib.rar

            Also comments may be added from a file using 
-z[file] switch.
            
The following command adds a comment from info.txt file:

            
rar c -zinfo.txt dummy


    cf      Add files comment
File comments are displayed when the 'v'
            
command is givenFile comment length is limited to 32767 bytes.

            
Example:

            
rar cf bigarch *.txt


    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 -av, -cl, -cu, -tlwhich do not
            have a dedicated command
.

            
It is not able to recompressencrypt 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:

            
rar ch -tl files.rar


    cw      Write archive comment to specified file
.

            
Format of output file depends on -sc switch.

            If 
output file name is not specifiedcomment data will be
            sent to stdout
.

            
Examples:

            
1rar cw arc comment.txt

            2
rar cw -scuc arc unicode.txt

            3
rar cw arc


    d       Delete files from archive
Please note if the processing of this
            command results in removing all the files from the archive
,
            
the empty archive would removed.


    
e       Extract files to current directory.


    
f       Freshen files in archiveUpdates those files changed since they
            were packed to the archive
This command will not add new files
            to the archive
.


    
i[i|c|h|t]=<string>
            
Find string in archives.

            
Supports following optional parameters:

              
- case insensitive search (default);

              
- case sensitive search;

              
hexadecimal search;

              
- use ANSIUnicode and OEM character tables (Windows only);

            If 
no parameters are specifiedit is possible to use
            
the simplified command syntax i<stringinstead of i=<string>

            
It is allowed to specify 't' modifier with other parameters,
            for 
exampleict=string performs case sensitive search
            using all mentioned above character tables
.

            
Examples:

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

            Perform 
case sensitive search of "first level" string
            in 
*.txt files in *.rar archives on the disk c:

            
2rar ih=f0e0aeaeab2d83e3a9 -r e:\texts

            Search 
for hex string f0 e0 ae ae ab 2d 83 e3 a9
            in rar archives in e
:\texts directory.


    
k       Lock archiveAny command which intends to change the archive
            will be ignored
.

            
Example:

            
rar k final.rar


    l
[t,b]  List contents of archive [technical]. Files are listed as with
            the 
'v' command with the exception of the file pathi.eonly
            the file name is displayed
Optional technical information
            
(host OSsolid flag and old version flagis displayed
            when 
't' modifier is usedModifier 'b' forces RAR to output
            only bare file names without any additional information
.


    
m[f]    Move to archive [files only]. Moving files and directories
            results in the files 
and directories being erased upon
            successful completion of the packing operation
Directories will
            not be removed 
if 'f' modifier is used and/or '-ed' switch is
            applied
.


    
p       Print file to stdout.

            
You may use this command together with -inul switch to disable
            all RAR messages 
and print only file dataIt may be important
            when you need to send a file to stdout 
for use in pipes.


    
r       Repair archiveArchive repairing is performed in two stages.
            
Firstthe damaged archive is searched for a recovery record
            
(see 'rr' command). If the archive contains a recovery record
            
and if the portion of the damaged data is continuous and less
            than N
*512 byteswhere N is number of recovery sectors placed
            into the archive
the chance of successful archive
            reconstruction is very high
When this stage has been completed,
            
new archive will be createdcalled fixed.arcname.rar,
            
where 'arcname' is the original (damagedarchive name.

            If 
a broken archive does not contain a recovery record or if
            
the archive is not completely recovered due to major damage,
            
a second stage is performedDuring this stage only the archive
            structure is reconstructed 
and it is impossible to recover
            files which fail the CRC validation
it is still possible,
            
howeverto recover undamaged fileswhich were inaccessible
            due to the broken archive structure
Mostly this is useful
            
for non-solid archivesThis stage is never efficient for
            
archives with encrypted file headerswhich can be repaired
            only 
if recovery record is present.

            
When the second stage is completedthe reconstructed archive
            will be saved 
as rebuilt.arcname.rarwhere 'arcname' is
            the original archive name
.

            While 
the recovery is in progressRAR may prompt the user for
            
assistance when a suspicious file is detected.

                      
Suspicious entry

              Name
:  <possibly filename>
              
Size:  <size>    Packed: <compressed size>

                      
Add itYes/No/All

            Answer 
'y' to add this entry to the file rebuilt.arcname.rar.

            
Example:

            
rar r buggy.rar


    rc      Reconstruct missing 
and damaged volumes using recovery volumes
            
(.rev files). You need to specify any existing volume
            
as the archive name, for example'rar rc backup.part03.rar'

            
Read 'rv' command description for information about
            recovery volumes
.


    
rn      Rename archived files.

            
The command syntax is:

            
rar rn <arcname> <srcname1> <destname1> ... <srcnameN> <destnameN>

            For 
examplethe following command:

            
rar 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:

            
rar rn data.rar *.txt *.bak

            will rename all 
*.txt files to *.bak.

            
RAR 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 a command is potentially dangerousbecause
            a wrong wildcard may corrupt all archived names
.


    
rr[N]   Add data recovery recordOptionallyredundant information
            
(recovery recordmay be added to an archiveThis will cause
            a small increase of the archive size 
and helps to recover
            archived files in 
case of disk failure or data losses of
            any other kind
provided that the damage is not too severe.

            
A recovery record contains up to 524288 recovery sectors.
            
The number of sectors may be specified directly in the 'rr'
            
command (1.. 524288) or, if it is not specified by
            the user
it will be selected automatically according to the
            archive size
a size of the recovery information will be about
            1
of the total archive sizeusually allowing the recovery of
            up to 0.6
of the total archive size of continuously damaged data.

            
It is also possible to specify the recovery record size in
            percent to the archive size
Just append the percent character
            to the command parameter
. For example:

            
rar rr3arcname

            Note that 
if you run this command from .bat or .cmd file,
            
you need to use rr3%% instead of rr3%, because the command
            processor treats the single 
'%' character as the start of
            a batch file parameter
You may also use 'p' instead of '%',
            
so 'rr3p' will work too.

            If 
data is damaged continuouslythen each rr-sector helps to
            recover 512 bytes of damaged information
This value may be
            lower in cases of multiple damage
.

            
The size of the recovery record may be approximately determined
            by the formula 
<archive size>/256 + <number of recovery
            sectors
>*512 bytes.


    
rv[N]   Create recovery volumes (.rev files), which can be later
            used to reconstruct missing 
and damaged files in a volume
            set
This command makes sense only for multivolume archives
            
and you need to specify the name of the first volume
            in the set 
as the archive name. For example:

            
rar rv3 data.part01.rar

            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
            
or damaged RAR volume. For example, if you have 30 volumes
            
and 3 recovery volumesyou 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.
            
The total number of usual and recovery volumes must not
            exceed 255.

            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 examplelock themafter
            creating REV files
recovery process will fail.

            
The optional <Nparameter 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
            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:

            
rar rv15data.part01.rar

            RAR reconstructs missing 
and damaged volumes either when
            using 
'rc' command or automatically, if it cannot locate
            the next volume 
and finds the required number of .rev files
            when unpacking
.

            
Original copies of damaged volumes are renamed to *.bad
            before reconstruction
. For examplevolname.part03.rar
            will be renamed to volname
.part03.rar.bad.
            

    
s[nameConvert archive to SFXThe archive is merged with a SFX module
            
(using a module in file default.sfx or specified in the switch).
            
In the Windows version default.sfx should be placed in the
            same directory 
as the rar.exein Unix in the user's
            home directory, in /usr/lib or /usr/local/lib.

    s-      Remove SFX module from the already existing SFX archive.
            RAR creates a new archive without SFX module, the original
            SFX archive is not deleted.

    t       Test archive files. This command performs a dummy file
            extraction, writing nothing to the output stream, in order to
            validate the specified file(s).

            Examples:

            Test archives in current directory:

            rar t *

            or for Unix:

            rar t '
*'

            User may test archives in all sub-directories, starting
            with the current path:

            rar t -r *

            or for Unix:

            rar t -r '
*'


    u       Update files in archive. Adds files not yet in the archive
            and updates files that have been changed since they were packed
            into the archive.


    v[t,b]  Verbosely list the contents of archive [technical].
            Files are listed using the format: full pathname, file comment,
            original and compressed size, compression ratio, last update
            date and time, attributes, CRC, compression method and minimum
            RAR version required to extract.
            
            Optional technical information such as "Host OS", "Solid"
            and "Old" flags is displayed, when '
t' modifier is used.
            "Host OS" shows the native operating system of RAR version
            used to create an archive. "Solid" flag is set if file uses
            the compression statistics from preceding files (see -s switch).
            "Old" flag means "Old file version" and indicates if it is
            the latest or old file version (see -ver switch for details).

            Modifier 'b' forces RAR to output only bare file names without
            any additional information.

            To list the contents of all archive volumes, use an asterisk
            ('
*') in place of the archive file extension or use the '-v'
            switch.

            Example:

            1) list contents of system.rar archive (technical mode)
               and redirect output to file techlist.lst

               rar vt system >techlist.lst

            2) list contents of tutorial.rar archive (bare file names mode)

               rar vb tutorial


    x       Extract files with full path.

            Example:

            rar x -av- -c- dime 10cents.txt

            extract specified file to current path. AV check and comment
            show are disabled.


    Switches (used in conjunction with a command):


    -?      Display help on commands and switches. The same as when none
            or an illegal command line option is entered.


    --      Stop switches scanning

            This switch tells to RAR 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 directory to the solid archive
            '
-StrangeName'

            RAR a -s -- -StrangeName

    -ac     Clear Archive attribute after compression or extraction
            (Windows version only).


    -ad     Append archive name to destination path.

            This option may be useful when unpacking a group of archives.
            By default RAR places files from all archives in the same
            directory, but this switch creates a separate directory
            for files unpacked from each archive.

            Example:

            rar x -ad *.rar data\

            RAR will create subdirectories below '
data' for every unpacking
            archive.


    -ag[format]
            Generate archive name using the current date and time.

            Appends the current date string to an archive name when
            creating 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 name as text string (Jan, Feb, etc.)
            W   - a week number (a week starts with Monday)
            A   - day of week number (Monday is 1, Sunday - 7)
            D   - day of month
            E   - day of year
            H   - hours
            M   - minutes (treated as minutes if encountered after hours)
            S   - seconds
            N   - archive number. RAR searches for already existing archive
                  with generated name and if found, increments the archive
                  number until generating a unique name. '
N' format character
                  is not supported when creating volumes.

            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 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.

            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 update 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 RAR will create a new archive
            instead of updating the already existing.


            Examples:

            1) use the default YYYYMMDDHHMMSS format

               rar a -ag backup

            2) use DD-MMM-YY format

               rar a -agDD-MMM-YY backup

            3) use YYYYMMDDHHMM format, place date before '
backup'

               rar a -ag+YYYYMMDDHHMM backup

            4) use YYYY-WW-A format, include fields description

               rar 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

               rar a -agYYYYMMDD-NN backup

    
    -ai     Ignore file attributes.

            If this switch is used when extracting, RAR 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.

            In Windows it affects archive, system, hidden and read-only
            attributes. in Unix - user, group, and others file permissions.


    -ao     Add files with Archive attribute set
            (Windows version only).

            Example:

            add all disk C: files with Archive attribute set
            to the '
f:backup' and clear files Archive attribute

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


    -ap     Set path inside archive. This path 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 directory '
DOCS\ENG' of archive 'release',
            you may run:

            rar a -apDOCS\ENG release readme.txt

            or to extract '
ENG' to the current directory:

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


    -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 (update) to synchronize
            contents of an archive and an archiving directory.

            For example, after the command:

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

            the archive '
backup.rar' will contain only *.cpp files
            from directory '
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.


    -av     Put authenticity verification (registered versions only).
            RAR will put, in every new and updated archive, information
            concerning the creator, last update time and archive name.

            If an archive, containing authenticity verification, is being
            modified and this switch is not specified, the authenticity
            verification information will be removed.

            When extracting, testing, listing or updating an archive with
            the '
-av' switch, RAR will perform integrity validation and
            display the message:

              Verifying authenticity information ...

            In the case of successful authenticity verification, 
            message '
Ok', creator name and last update information will be
            displayed. In the case of authenticity verification failure,
            message '
FAILED' will be displayed.

            RAR authenticity verification can be forged and does not
            provide the same level of security as modern digital signature
            schemes based on public key infrastructure. We recommend 
            to use this RAR feature as informational only, like a special
            archive comment. Avoid it in situations, when accurate
            information about archive creator is important.

            In order to enable the authenticity verification feature,
            the program must be registered. Please contact your local
            distribution site or the world-wide distribution center.


    -av-    Disable authenticity verification checking or adding.


    -cfg-   Ignore configuration file and RAR environment variable.


    -cl     Convert file names to lower case.


    -cu     Convert file names to upper case.


    -c-     Disable comments show.


    -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".
           

    -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 option could be dangerous, because it allows
            to archive a file, which at the same time is modified
            by another application, so use it carefully.


    -dr     Delete files to Recycle Bin

            Delete files after archiving and place them to Recycle Bin.
            Available in Windows version only.
           

    -ds     Do not sort files while adding to a solid archive.


    -dw     Wipe files after archiving

            Delete files after archiving. Before deleting file data
            are overwritten by zero bytes to prevent recovery of
            deleted files.


    -ed     Do not add empty directories

            This switch indicates that directory records are not to be
            stored in the created archive. When extracting such archives,
            RAR creates non-empty directories basing on paths of files
            contained in them. Information about empty directories is
            lost. All attributes of non-empty directories 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, RAR will not
            remove empty directories.


    -ee     Do not process extended attributes

            Disables saving and restoring extended file attributes.
            Only for OS/2 versions.


    -en     Do not add "end of archive" block

            By default, RAR 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. 


    -ep     Exclude paths from names. This switch enables files to be added
            to an archive without including the path information. This
            could, of course, result in multiple files existing in the
            archive with the same name.


    -ep1    Exclude base dir from names. Do not store the path entered in
            the command line.

            Example:

            all files and directories from the directory tmp will be added
            to the archive '
test', but the path in archived names will not
            include '
tmp\'

            rar a -ep1 -r test tmp\*

            This is equivalent to the commands:

            cd tmp
            rar a -r ..\test
            cd ..


    -ep2    Expand paths to full. Store full file paths (except a drive
            letter and leading path separator) when archiving.
    

    -ep3    Expand paths to full including the drive letter.
            Windows version only.

            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 directories 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:

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

            to create backup and:

            rar 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.


    -e[+]<attr>
            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 Windows version is also possible to use symbols D, S, H,
            A and R instead of a digital mask to denote directories
            and files with system, hidden, archive and read-only attributes.
            The order in which the attributes are given is not significant.
            Unix version supports D and V symbols to define directory
            and device attributes.

            It is allowed to specify both -e<attr> and -e+<attr>
            in the same command line.

            Examples:

            1) archive only directory names without their contents

               rar a -r -e+d dirs

            2) do not compress system and hidden files:

               rar a -esh files

            3) do not extract read-only files:

               rar x -er files


    -f      Freshen files. May be used with archive extraction or creation.
            The command string "a -f" is equivalent to the command '
f', you
            could also use the switch '
-f' with the commands 'm' or 'mf'. If
            the switch '
-f' is used with the commands 'x' or 'e', then only
            old files would be replaced with new versions extracted from the
            archive.


    -hp[p]  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:

            rar a -hpfGzq5yKw secret report.txt

            will add the file report.txt to the encrypted archive
            secret.rar using the password '
fGzq5yKw'


    -id[c,d,p,q]
            Disable messages.

            Switch -idc disables the copyright string.

            Switch -idd disables "Done" string at the end of operation.

            Switch -idp disables the percentage indicator.

            Switch -idq turns on the quiet mode, so only error messages
            and questions are displayed.

            It is allowed to use several modifiers at once,
            so switch -idcdp is correct.


    -ieml[.][addr]
            Send archive by email. Windows version only.

            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.


    -ierr   Send all messages to stderr.


    -ilog[name]
            Log errors to file (registered version only).

            Write error messages to rar.log file. If optional '
name'
            parameter is not specified, the log file is created
            using the following defaults:

            Unix:    .rarlog file in the user'
s home directory;
            
Windowsrar.log file in %APPDATA%\WinRAR directory.

            If 
'name' parameter includes a file name without path,
            
RAR will create the log file in default directory from
            the 
list above using the specified name. Include both path
            
and name to 'name' parameter if you wish to change
            the location of log file
.

            
Example:

            
rar a -ilogc:\log\backup.log backup d:\docs

            will create c
:\log\backup.log log file in case of errors.


    -
inul   Disable all messages.


    -
ioff   Turn PC off after completing an operationThe hardware must
            support the power off feature
Windows version only.


    -
isnd   Enable sound.


    -
k      Lock archiveAny command which intends to change the archive
            will be ignored
.


    -
kb     Keep broken extracted files.

            
RARby default, deletes files with CRC errors after
            extraction
The switch -kb specifies that files with
            CRC errors should not be deleted
.


    -
m<n>   Set compression method:

       -
m0   store     do not compress file when adding to archive
       
-m1   fastest   use fastest method (less compressive)
       -
m2   fast      use fast compression method
       
-m3   normal    use normal (default) compression method
       
-m4   good      use good compression method (more
                       compressive
but slower)
       -
m5   best      use best compression method (slightly more
                       compressive
but slowest)

            If 
this switch is not specifiedRAR uses -m3 method
            
(normal compression).

            
By default, RAR uses only the general compression
            algorithm in 
-m1 and -m2 methodsadvanced algorithms
            like audio 
and true color processing are enabled
            only in 
-m3..-m5 modesthe advanced text compression
            is activated only in 
-m4..-m5This default can be
            overridden using 
-mc switch.


    -
mc<par>
            
Set advanced compression parameters.

            
This switch is intended mainly for benchmarking and
            
experimentsIn the real environment it is usually better
            to allow RAR to select optimal parameters automatically
.
            
Please note that improper use of this switch may lead
            to very serious performance 
and compression lossso use
            
it only if you clearly understand what you do.

            
It has the following syntax:

            -
mc[param1][:param2][module][+ or -]

            
where <moduleis 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 (RGBdata compression;
              
D       delta compression;
              
E       32-bit x86 executables compression;
              
I       64-bit Intel Itanium executables compression;
              
T       text compression.

            
'+' sign at the end of switch applies the selected algorithm
            module to all processed data
'-' disables the module at all.
            If 
no sign is specifiedRAR will choose modules automatically,
            
based on data and the current compression method.

            Switch -
mcdisables all optional modules and allows only
            the general compression algorithm
.

            <
Param1> and <Param2are module dependent parameters
            described below
.

            
Audio compressiondelta compression:

            <
Param1is a number of byte channels (can be 1 31).
            
RAR splits multibyte channels to bytes, for example,
            
two 16-bit audio channels are considered by RAR as four
            channels one byte each
.

            <
Param2is ignored.


            
32-bit x86 Intel executables compression,
            
64-bit Intel Itanium executables compression,
            
true color (RGBdata compression:

            <
Param1> and <Param2are ignored.


            
Text compression

            <
Param1is the order of PPM algorithm (can be 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
.

            <
Param2is memory in megabytes allocated for PPM (1-128).
            
Higher values may increase the compression ratiobut note
            that PPM uses the equal memory size both to compress 
and
            
decompressso 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 -mc1aforces use of 8-bit mono audio compression
            
for all data.

            
2) switch -mc10:40tforces use of text compression
            algorithm 
for all datasets 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 usedbut leaves to RAR to
            decide when to 
use it.

            
4switches -mct- -mcddisable text and delta compression.


    -
md<n>  Select dictionary size <nin KBMust be 64128256512,
            
10242048 or 4096 or a letter 'a''b''c''d''e''f''g'
            
respectively.

            
The sliding dictionary is a special memory area used by the
            compression algorithm
. If the size of the file being compressed
            
(or the total files size in the case of a solid archiveis
            greater than the dictionary size
then increasing the dictionary
            size will generally increase compression ratio
decrease packing
            speed 
and increase memory requirements.

            
RAR can reduce the dictionary size if it is significantly
            larger than the size of the source data
It helps to reduce
            memory requirements without decreasing compression
.

            Default 
sliding dictionary size is 4096 KB.

            
Example:

            
RAR a --mdd sources *.asm
                
or
            
RAR a --md512 sources *.asm

            Will create a solid archive using a 512 KB dictionary
.


    -
ms[list]
            
Specify file types to store.

            
Specify file typeswhich will be stored without compression.
            
This switch may be used to store already compressed files,
            
which 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 RAR to store without compression all RAR 
and ZIP
            archives 
and JPG imagesIt is also allowed to specify wildcard
            file masks in the 
list, so -ms*.rar;*.zip;*.jpg will work too.

            If <list> 
is not specified, -ms switch will use the default
            
set of extensionswhich includes the following file types:

            
7zacearjbz2cabgzjpegjpglhalzhmp3,
            
rartaztgzzzip


    
-mt<threads>
            
Set the number of threadsAvailable in Windows version only.

            <
threadsparameter can take values from 0 to 16.
            It defines the recommended number of active threads
            
for compression algorithm. If it is greater than 0,
            
RAR will use the multithreaded version of compression
            algorithm providing higher speed on multiprocessor
            architectures
Real number of active threads can differ
            from the specified
.

            If <
threadsis zeroRAR will use the single threaded
            compression algorithm
.

            
Change of <threadsparameter 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 specifiedRAR will try to detect
            the number of available processors 
and select the optimal
            number of threads automatically
.


    -
n<f>   Include only the specified file <f>. Wildcards may be used
            both in the name 
and file parts of file maskYou may specify
            the 
switch '-n' several times.

            
This switch does not replace usual file maskswhich 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 -switch. It can help to
            reduce the command line length sometimes
.

            For 
example, if you need to compress all *.txt and *.lst
            files in directories Project 
and Infoyou can enter:

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

            
or using the switch -n:

            
rar a --n*.txt -n*.lst text Project Info


    
-n@<lf> Include files listed in the specified list file.

            
Similar to -n<f> switch, but reads include masks from
            the 
list file. If you use -nwithout the list file name
            parameter
it will read file names from stdin.

            
Example:

            
rar a --n@inclist.txt text Project Info


    
-oc     Set NTFS Compressed attributeWindows version only.

            
This switch allows to restore NTFS Compressed attribute
            when extracting files
RAR saves Compressed file attributes
            when creating an archive
but does not restore them unless
            
-oc switch is specified.


    -
ol     Save symbolic links as the link instead of the file.
            
Unix version only.


    -or     
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.


    -
os     Save NTFS streamsWindows version only.

            
This switch has meaning only for NTFS file system and allows
            to save alternative data streams associated with a file
.
            
It is especially important in Windows 2000XP and newer,
            
which use streams to keep some file dependent information
            like file descriptions
. If you use RAR to backup your
            NTFS disks
it is recommended to specify this switch.


    -
ow     Use this switch when archiving to save file security
            information 
and when extracting to restore it.

            
Unix RAR version saves file owner and group when using
            this 
switch.

            
Windows version stores ownergroupfile permissions and
            
audit informationbut only if you have necessary privileges
            to read them
Note that only NTFS file system supports
            file based security under Windows
.


    -
o[+|-] Set the overwrite modeCan be used both when extracting
            
and updating archived filesFollowing modes are available:

              -
o           Ask before overwrite
                           
(default for extracting files);

              -
o+          Overwrite all
                           
(default for updating archived files);

              -
o-          Skip existing files.
                           

    -
p[p]   Encrypt files with the string <p> as password while archiving.
            
The password is case-sensitive. If you omit the password on the
            command line
you will be prompted with message "Enter password".

            
Example:

            
rar a -pmyhoney secret1 *.txt

            add files 
*.txt and encrypt them with password "myhoney".


    -
p-     Do not query password


    
-r      Recurse subdirectoriesMay be used with commands:
            
aufmxetpvlccf and s.

            
When used with the commands 'a''u''f''m' will process
            files in all sub
-directories as well as the current working
            directory
.

            
When used with the commands xetpvlccf or s will
            process all archives in sub
-directories as well as the current
            working directory
.


    -
r-     Disable recursion.

            
Even without -switch RAR can enable the recursion
            automatically in some situations
. Switch -rprohibits it.

            If 
you specify a directory name when archiving and if such 
            name does not 
include wildcardsby default RAR adds
            the directory contents even 
if switch -r is not specified.
            
Also RAR automatically enables the recursion if disk root
            without wildcards is specified 
as a file mask. Switch -r
            
disables such behavior
            
            For 
example:
            
            
rar a -rarc dirname
            
            command will add only the 
empty 'dirname' directory and ignore 
            its contents
Following command:
            
            
rar a -rarc c:\
            
            
will compress contents of root cdirectory only and 
            
will not recurse into subdirectories.


    -
r0     Similar to -rbut when used with the commands 'a''u''f',
            
'm' will recurse subdirectories only for those nameswhich
            
include wildcard characters '*' and '?'


    
-ri<p>[:<s>]
            
Set priority and sleep timeAvailable only in RAR for Windows.
            
This switch regulates system load by RAR in multitasking
            environment
Possible task priority <pvalues are 0 15.

            
If <pis 0RAR uses the default task priority.
            <
pequal to 1 sets the lowest possible priority,
            
15 the highest possible.

            
Sleep time <sis a value from 0 to 1000 (milliseconds).
            
This is a period of time that RAR gives back to the system
            after every read 
or write operation while compressing
            
or extractingNon-zero <smay be useful if you need to reduce
            system load even more than can be achieved with 
<pparameter.

            
Example:

            
execute RAR with default priority and 10 ms sleep time:

            
rar a -ri0:10 backup *.*


    -
rr[N]  Add a data recovery recordThis switch is used when creating
            
or modifying an archive to add a data recovery record to
            the archive
See the 'rr[N]' command description for details.


    -
rv[N]  Create recovery volumesThis switch is used when creating
            a multivolume archive to generate recovery volumes
.
            
See the 'rv[N]' command description for details.


    -
s      Create solid archiveA solid archive is an archive packed by
            a special compression method
which treats several or all 
            files
within the archive, as one continuous data stream.

            
Solid archiving significantly increases compressionwhen 
            adding a large number of small
similar filesBut it also
            has a few important disadvantages
slower updating of existing
            solid archives
slower access to individual fileslower
            damage resistance
.

            
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.

            
Example:

            
create solid archive sources.rar with 512 KB dictionary,
            
recursing all directoriesstarting with the current directory.
            
Add only .asm files:

            
rar a --md512 sources.rar *.asm -r


    
-s<N>   Create solid groups using file count

            Similar to 
-sbut resets solid statistics after compressing
            
<NfilesUsually decreases compressionbut also
            decreases losses in 
case of solid archive damages.


    -
sc<charset>[objects]
            
Specify the character set for list files and archive
            comment files
.

            
'Charset' parameter is mandatory and can have one
            of the following values
:

              
Unicode;
              
ANSI (WindowsencodingWindows version only;
              
OEM (DOSencodingWindows version only.

            
Files in Unicode format must have FFFE or FEFF Unicode
            character in the beginning
otherwise RAR will ignore
            this 
switch and process the file as ASCII text.

            
'Objects' parameter is optional and can have one of
            the following values
:

              
- list files;
              
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:

            
1rar a -scol data @list

            
Read names contained in 'list' using OEM encoding.

            
2rar c -scuc -zcomment.txt data

            Read comment
.txt as Unicode file.

            
3rar cw -scuc data comment.txt

            Write comment
.txt as Unicode file.


    -
se     Create solid groups using extension

            Similar to 
-sbut resets solid statistics if file extension
            is changed
Usually decreases compressionbut also
            decreases losses from solid archive damages
.


    -
sfx[name]
            
Create SFX archives. If this switch is used when creating a new
            
archivea Self-Extracting archive (using a module in file
            
default.sfx or specified in the switch) would be created.
            
In the Windows version default.sfx should be placed in the
            same directory 
as the rar.exein Unix in the user's
            home directory, in /usr/lib or /usr/local/lib.

            Example:

            rar a -sfxwincon.sfx myinst

            create SelF-eXtracting (SFX) archive using wincon.sfx
            SFX-module.


    -si[name]
            Read data from stdin (standard input), when creating
            an archive. Optional '
name' parameter allows to specify
            a file name of compressed stdin data in the created
            archive. If this parameter is missing, the name will be
            set to '
stdin'. This switch cannot be used with -v.

            Example:

            type Tree.Far | rar a -siTree.Far tree.rar

            will compress '
type Tree.Far' output as 'Tree.Far' file.


    -sl<size>
            Process only those files, which size is less than
            specified in <size> parameter of this switch.
            Parameter <size> must be specified in bytes.


    -sm<size>
            Process only those files, which size is more than
            specified in <size> parameter of this switch.
            Parameter <size> must be specified in bytes.


    -sv     Create independent solid volumes

            By default RAR 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 RAR 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 RAR cannot reset statistics even
            using this switch. For example, it cannot be done when 
            compressing one large file split between several volumes.
            RAR 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.


    -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.


    -s-     Disable solid archiving


    -t      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.


    -ta<date>
            Process only files modified after the specified date.

            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".


    -tb<date>
            Process only files modified before the specified date.
            Format of the switch is the same as -ta<date>.


    -tk     Keep original archive date. Prevents RAR from modifying the
            archive date when changing an archive.


    -tl     Set archive time to newest file. Forces RAR to set the date of a
            changed archive to the date of the newest file in the archive.


    -tn<time>
            Process files newer than the specified time period. 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.


    -to<time>
            Process files older than the specified time period. Format
            of the switch is the same as -tn<time>.


    -ts<m,c,a>[N]
            Save or restore file time (modification, creation, access).

            Switch -tsm instructs RAR to save file modification time,
            -tsc - creation time and tsa - last access time. Optional
            parameter after the switch is the number between 0 and 4
            controlling the file time precision. Value '
1' enables
            1 second precision, 2 - 0.0065536 sec, 3 - 0.0000256 sec and
            4 or '
+' enables the maximum NTFS time precision, which is
            equal to 0.0000001 sec. Value '
0' or '-' means that creation
            and access time are not saved and low (two seconds) precision
            is used for modification time. Higher precision modes add
            more data to archive, up to 19 additional bytes per file
            in case of -tsm4 -tsa4 -tsc4 combination. If no precision
            is specified, RAR uses '
4' (high) value.

            Default RAR mode is -tsm4 -tsc0 -tsa0, so modification time
            is stored with the high precision and other times are ignored.

            It is necessary to specify -tsc and -tsa switches to set
            creation and access time when unpacking files (precision
            is irrelevant, but must not be 0). By default RAR sets
            only the modification time, even if archive contains
            creation and last access time. Setting the modification
            time to unpacked files may be also disabled with -tsm-.

            It is possible to omit the time type letter if you need
            to apply the switch to all three times. For example,
            -tsm4 -tsa4 -tsc4 can be replaced by -ts4, -ts+ or -ts.
            Use -ts- to save only the low precision modification time
            or to ignore all three file times on unpacking. 



RE: مشروع ضغط وفك ضغط الملفات zip/Unzip files [عادل] - الشاكي لله - 07-11-15

(07-11-15, 02:49 PM)أبو عمر كتب : قبل سنوات احتجت للضغط في أحد البرامج فما كان امامي الا استخدم الملف المساعد مع ارار Rar.Exe
والغضط يكون على سبيل المثال
rar "ic=first level" -r c:\*.rar *.txt
وستجد في مجلد winRar ملف نصي هذا محتواه
PHP كود :
ple,
 
           -tsm4 -tsa4 -tsc4 can be replaced by -ts4, -ts+ or -ts.
 
           Use -tsto save only the low precision modification time
            or to ignore all three file times on unpacking



نعم طريقتي هي نفسها باستعمال ملف rar.exe

هذا هو الكلاس محول للفيجوال بيسك
PHP كود :
Imports System.Collections.Generic
Imports System
.Diagnostics
Imports System
.Linq
Imports System
.Text

Namespace Rar_Files.Classes
    
Class RARHelper


        
Public Class Compress
            
'compress'
            
Public Shared Function CreateFilesArgument(files As String(), archivePath As String) As String
                Dim files_path 
As String = [String].Join(" "files)
                Return 
String.Format("a -ep ""{0}"" @""{1}"""archivePathCreateListFile(files))

            
End Function


            Public 
Shared Function CreateFolderArgument(folder As StringarchivePath As String) As String
                
Return String.Format("a -ep ""{0}"" ""{1}"""archivePathfolder)
            
End Function

            Public 
Shared Sub Execute(winrarExePath As Stringargument As String)

                
'Execute on rar exe
                Dim p As New Process()
                p.StartInfo.FileName = winrarExePath
                p.StartInfo.Arguments = argument
                p.Start()
                p.WaitForExit()
            End Sub



            '
-------------------------------- '
            Private Shared Function CreateListFile(files As String()) As String
                Const  LIST_FILE As String = "List.txt"
                System.IO.File.WriteAllLines(LIST_FILE, files)
                Return LIST_FILE
            End Function
        End Class




    End Class
End Namespace 


عليك بارفاق ملف rar.exe الى جانب الملف التنفيذي الخاص بتطبيقك
ثم عليك باستعمال الكلاس اعلاه كما يلي :
PHP كود :
Dim rar_path As String Application.StartupPath "/Rar.exe"
Dim filesToCompress As String() = New String() {"C://vb4arb.txt""C://operand.mp3""C;//12.png""C://kk.jpg"}

Dim argument As String RARHelper.Compress.CreateFilesArgument(filesToCompress"C://archive.rar")
RARHelper.Compress.Execute(rar_pathargument


الاستخراج لم اقم بعمله حتى الان ، لاني متحير هل استخدم الوين رار ولا كلاسات 7z

ولكن التطبيق شبه جاهز الخاص بالوين رار :


اضغط على الصورة للتحميل :-



اسم الملف التنفيذي للتطبيق هو Compress_Extract.exe
الملفي rar.exe و unRAR.exe هما ملفات تابعان للوين رار يستخدمان للضغط او الاستخراج


RE: مشروع ضغط وفك ضغط الملفات zip/Unzip files [عادل] - adel27 - 07-11-15

لو تسويها في مثال وترفقها يالشــاكي ولا عليك أمر
مع أحتاحة أمكانية أن المستخدم يختار أكثر من ملف


RE: مشروع ضغط وفك ضغط الملفات zip/Unzip files [عادل] - الشاكي لله - 07-11-15

التطبيق فوق موجود

بامكانه ضغط ملفات ، او ضغط مجلد كامل

اضغط على الصورة لتحميله