1. Use pack200 to compress the batch processing (pack. BAT) of all jar packages in the current directory)
:: ========================================================== ====================
: List all jar packages under the plugin directory and compress pack200.
: Name the compressed file as: original file name (without jarsuffix) pack.gz
: Author: Iron wood box
: Data: 2008.08.22
:: ========================================================== ====================
@ Echo off
Setlocal enabledelayedexpansion
Set suffix=pack.gz
For % I in (*. Jar) Do (
Set oname = % I
Set tname =! Oname :~ 0,-3!
Set nname =! Tname !! Suffix!
: @ Echo "pack "! Oname! ""! Nname!
Echo processing file :! Oname!
Start/Wait pack200! Nname! ! Oname!
Del/F! Oname!
Set/A fnums + = 1
)
Echo ===================================================== ==================
Echo congratulations! File Processing is complete, compressed! Fnums! Files!
Echo ===================================================== ==================
Endlocal
Pause
2. Use unpack200 to decompress the batch processing (unpack. BAT) of all files processed by pack200 in the current directory)
:: ========================================================== ====================
: List all compressed packages processed by pack200 under the plugin directory and restore them.
: Name the decompressed file: original file name (without the pack.gz suffix) + jar
: Author: Iron wood box
: Data: 2008.08.22
:: ========================================================== ====================
@ Echo off
Setlocal enabledelayedexpansion
Set suffix = jar
For % I in (* .pack.gz) Do (
Set oname = % I
Set tname =! Oname :~ 0,-7!
Set nname =! Tname !! Suffix!
: @ Echo "unpack "! Oname! ""! Nname!
Echo processing file :! Oname!
Start/Wait unpack200! Oname! ! Nname!
Del/F! Oname!
Set/A fnums + = 1
)
Echo ===================================================== ==================
Echo congratulations! File Processing is complete. Decompress all files! Fnums! Files!
Echo ===================================================== ==================
Endlocal
Pause