Copy an paste to this forum...
************************************************** ************************
08-16-2016, 02:59 PM
[Firmware Unzip23.bat version 2.3]
Extracts multiple Ricoh or Kyocera firmware to SD-Card or HDD
Requirement:
7-Zip.exe source : 7-Zip download | SourceForge.net
General update to version 2.2
For those people who have request the use of this batch file.
The following is a version update from 2.1 to 2.3
The current batch file is used the same as all other versions.
In version 2.3 there have been some minor error handling changes, along with additional output for user feed back;otherwise the *.bat file is just the same.
If you cut and paste the below snip text to a *.bat, file you will need to repair the menu spacing * * lines in
the menu block. CTN automatically removes those duplicate spaces causing the * * indentation.
You must also place any line wrapped text back to the previous single line.
---------------------------------8<------------Cut an paste to any *.bat file ----------------------------------------------
@Echo off
@CLS
@REM This batch file is for extracting multiple firmware zip files onto an SD/CF card or hardrive
@REM directory.
@REM Copyright(C) 2010 Neomatrix Updated : 16/08/2016 (dd/mm/yy)
@REM Version 2.3
@REM [Ver2.3] Minor error handling modifications. Add more visual feed back.
@REM Important : Requires 7-ZIP.exe archive utility. This can be downloaded off the Internet.
@REM Usage : 7ZA.EXE e -i!*.fwu -y firmware.zip
@REM 7ZA.EXE e = extract -i = includefiles !*.fwu = !filespec -o = Ouput direct -y = yes all
@REM prompts Firmware.zip archive.
@REM 7ZA full file and path name must exist : Example : Set Zip7path="c:\program files (x86)
@REM \7za\7ZA.EXE"
@REM Must use quotation marks if spaces are used in above path name.
@REM
@REM HOW TO USE :
@REM To uses this file, simple copy the unzip23.bat batch file into the same firmware directory
@REM and double click.
@REM When run with out any paramaters, the program will default to the "Homedrive\romdata"
@REM directory of the operating system main drive.
@REM To force extraction to a SD/CF card, run the upzip23.bat file from a command prompt with
@REM the drive letter of the SD/CF card. Example unzip23 h:
@REM Please feel free add your own improvement ideas and/or to share this batch file with
@Rem whomever.
@Rem Important set the default 7za.exe path here
@REM Set Zip7path="C:\Program Files (x86)\7za\7ZA.EXE"
@Set Zip7path="%ProgramFiles(x86)%\7za\7ZA.EXE"
@REM Echo %Zip7path%
IF NOT EXIST %Zip7path% GOTO ERROR:
@Echo.
@Echo ****************[ RICOH - KYOCERA ]******************
@Echo * EXTRACT FIRMWARE *
@Echo * Unzip Batch Mode *
@Echo ********************************* Copytechnet.com ***
@Echo * *
@Echo * Usage : unzip23 [drive:\path\] *
@Echo * Example : unzip23 h: {defaults h:\romdata} *
@Echo * Copy unzip23.bat to the firmware source directory.*
@Echo * Unzip23 extracts *.zip and *.exe archive formats, *
@Echo * an exports the *.fwu,*.rfu and *.bin files only. *
@Echo * *
@Echo ***************************************[Ver 2.3]*****
@Echo.
@Set drive=%1
@Set direct=%1\romdata
@REM change default drive here if param line empty.
@IF "%1x"=="x" Set drive=%HOMEDRIVE%
@IF "%1x"=="x" Set direct=%HOMEDRIVE%\romdata
@Echo Extracting to :%direct%
@Echo Press Ctrl-C at any time to terminate batch process.
@Echo.
@pause
@REM Allow Unzip.Bat to run 5 times while saving any existing romdata directory files.
@REM Each time this batch file is run all previous romdata_? folders are renamed letter incremented.
@REM Renaming prevents overwritting previous firmware by mistake. Delete the last Romdata_E
@REM folder off the list.
@REM Always Delete 5th backup directory Romdata_E and sub directories regardless.
@IF NOT EXIST %drive%\Romdata_E GOTO AD:
@Echo Deleted directory %drive%\Romdata_E
@RD %drive%\Romdata_E /Q /S
:AD
@IF NOT EXIST %drive%\Romdata_D GOTO AC:
@RENAME %drive%\Romdata_D Romdata_E
@Echo %drive%\Romdata_D Rename to %drive%\Romdata_E
:AC
@IF NOT EXIST %drive%\Romdata_C GOTO AB:
@RENAME %drive%\Romdata_C Romdata_D
@Echo %drive%\Romdata_C Rename to %drive%\Romdata_D
:AB
@IF NOT EXIST %drive%\Romdata_B GOTO AA:
@RENAME %drive%\Romdata_B Romdata_C
@Echo %drive%\Romdata_B Rename to %drive%\Romdata_C
:AA
@IF NOT EXIST %drive%\Romdata_A GOTO AR:
@RENAME %drive%\Romdata_A Romdata_B
@Echo %drive%\Romdata_A Rename to %drive%\Romdata_B
:AR
@IF NOT EXIST %drive%\Romdata GOTO MakeDirect:
@RENAME %drive%\Romdata Romdata_A
@Echo %drive%\Romdata Rename to %drive%\Romdata_A
:MakeDirect
@Echo.
@REM Make the directory in the SD/CF card or H/D path.
@REM MakeDir Will default with an error echo if directory already exists.
@IF NOT EXIST %direct% md %direct%
@REM %%f = file variable to use. Add your extract file specs inside the brackets.
@Echo ****** 7-Zip is Extracting Multiple Firmware ********
@FOR %%f in (*.zip;*.exe) do %Zip7path% e -i!*.fwu -i!*.bin -i!*.rfu -o%direct% -y %%f
@GOTO END:
:Error
@Echo ERROR : User input parameters are invalid check :
@Echo [drive\path\romdata] : %1
@Echo Check 7za.exe is in the correct directory.
@GOTO EOF:
:End
@Echo.
@Echo ************************************************** ********
@Echo All "*.fwu, *.rfu or *.bin" files have been extracted to :
@Echo %direct%
@Echo ************************************************** ********
@IF NOT EXIST %1\Romdata_B GOTO EOF
@Echo Existing romdata folder(s) have been renamed. See
@Echo the start of this window for further details.
@Echo ************************************************** ********
@Echo.
:EOF
@pause
---------------------------------8<----------------------------------------------------------------------------
Bookmarks