- @echo off
- set "FileASCII=C:\Test\a.txt"
- set "FileResult=%temp%\DecResult.txt"
- set ChrNum=
- set /p DecCode=<"%FileASCII%"
- set DecCode=head %DecCode% tail
-
- :Num2Chr
- set DecCode=%DecCode:* =%
- if "%DecCode%" neq "tail" (
- if "%DecCode%" neq "" (
- call :SplitDec 0x%DecCode%
- goto :Num2Chr
- )
- )
- echo OutPutFile="%FileResult%">"%temp%\Decode.vbs"
- echo Set objFSO=CreateObject("Scripting.FileSystemObject")>>"%temp%\Decode.vbs"
- echo Set objTXT=objFSO.CreateTextFile(OutPutFile,True,False)>>"%temp%\Decode.vbs"
- echo ChrVBS=""%ChrNum%>>"%temp%\Decode.vbs"
- echo objTXT.Write ChrVBS>>"%temp%\Decode.vbs"
- cscript //nologo "%temp%\Decode.vbs"
- start "" "%FileResult%"
- goto:eof
-
- :SplitDec
- set ChrNum=%ChrNum%+Chr(%1)
复制代码
|