![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-09 03:05 |
47,811 topics / 349,895 posts / today 0 new / 48,253 members |
| DOS批处理 & 脚本技术(批处理室) » Convert EXE to TXT-Unicode format mobile e-books |
| Printable Version 3,049 / 3 |
| Floor1 qingfushuan | Posted 2008-07-05 12:14 |
| 高级用户 Posts 327 Credits 502 | |
|
I've made an incomplete P, see the attachment -- the test exe is already in temp.
Problems and purposes After converting to txt, in temp there are 1. temp\We斯理001\0\*.txt (20 txt files such as 01.txt, 02.txt...) 2. temp\We斯理002\0\*.txt (15 txt files such as 01.txt, 02.txt...) 3. temp\We斯理003\0\*.txt (12 txt files such as 01.txt, 02.txt...) Now need to I. Combine the 20 txt files under temp\We斯理001\0\ into one "We斯理001.txt" into the newly created "We斯理" in the current directory Combine the 15 txt files under temp\We斯理002\0\ into one "We斯理002.txt" into the newly created "We斯理" in the current directory Combine the 12 txt files under temp\We斯理003\0\ into one "We斯理003.txt" into the newly created "We斯理" in the current directory II. Directly copy temp\《Liu Yao Yin Yang Jing》\《Liu Yao Yin Yang Jing》.txt to "《Liu Yao Yin Yang Jing》.txt" in the current directory How to rewrite this P, please do not sting to teach! Attachment [ Last edited by qingfushuan on 2008-7-5 at 12:45 PM ] |
|
| Floor2 HAT | Posted 2008-07-05 13:36 |
| 版主 Posts 5,017 Credits 9,023 | |
|
```batch
@echo off md "%~dp0卫斯理" >"%~dp0卫斯理\卫斯理001.txt" type nul >"%~dp0卫斯理\卫斯理002.txt" type nul >"%~dp0卫斯理\卫斯理003.txt" type nul for %%a in ("C:\Test\SrcDir\temp\卫斯理001\0\*.txt") do ( >>"%~dp0卫斯理\卫斯理001.txt" type "%%a" >>"%~dp0卫斯理\卫斯理001.txt" echo. ) for %%a in ("C:\Test\SrcDir\temp\卫斯理002\0\*.txt") do ( >>"%~dp0卫斯理\卫斯理002.txt" type "%%a" >>"%~dp0卫斯理\卫斯理002.txt" echo. ) for %%a in ("C:\Test\SrcDir\temp\卫斯理003\0\*.txt") do ( >>"%~dp0卫斯理\卫斯理003.txt" type "%%a" >>"%~dp0卫斯理\卫斯理003.txt" echo. ) copy /y "C:\Test\SrcDir\temp\《六爻阴阳经》\《六爻阴阳经》.txt" ""%~dp0《六爻阴阳经》.txt" ``` |
|
| Floor3 qingfushuan | Posted 2008-07-05 16:20 |
| 高级用户 Posts 327 Credits 502 | |
|
I think I didn't make my meaning clear:
1. temp\Weisili 001\0\*.txt is decompiled from Weisili 001.exe, it might be temp\Weisili 001\*.txt, or it might be temp\Weisili 001\0\*.txt 2. If the situation of temp\Weisili 001\*.txt occurs, then combine all the *.txt under the "Weisili 001" directory into one file named Weisili 001.txt. If it is the situation of temp\Weisili 001\0\*.txt, then put the combined Weisili 001.txt into the newly created "Weisili" directory 3. Weisili 001.exe should be changing, it might also be Weisili 002.exe, Internet Cafe Management.exe, in short, it applies to exe e-books compiled by ebook, all exes decompiled by miniKillEBook.exe (attached), then the corresponding txt files and directories will be changed to Weisili,, Internet Cafe Management.txt I don't know if I made it clear. The following is a P that I wrote and am not satisfied with ::qingfushuan cn-dos xp&cmd 2008-02-25 @echo off&Setlocal EnableDelayedExpansion ::Call miniKillEBook.exe to decompile to txt start miniKillEBook.exe for %%i in (temp\*.exe) do set wj=%%~ni &start /w %%i ::Integrate all txt under temp into one for /f "delims=" %%a in ('dir /a-d /b /s *.txt') do (echo ------%%~na------ type "%%a" echo; )>>Manual Renaming-!wj!.txt The file name here should be automatically named ::Convert to Unicode format start /w TXT2Unicode.exe [ Last edited by qingfushuan on 2008-7-5 at 04:23 PM ] |
|
| Floor4 qingfushuan | Posted 2008-07-07 09:01 |
| 高级用户 Posts 327 Credits 502 | |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |