China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-09 02:21
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Convert EXE to TXT-Unicode format mobile e-books View 3,047 Replies 3
Original Poster Posted 2008-07-05 12:14 ·  中国 四川 绵阳 江油市 电信
高级用户
★★★
Credits 502
Posts 327
Joined 2006-12-30 06:01
19-year member
UID 74981
Gender Male
Status Offline
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 ]
Floor 2 Posted 2008-07-05 13:36 ·  中国 重庆 九龙坡区 电信
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
```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"
```
Floor 3 Posted 2008-07-05 16:20 ·  中国 四川 绵阳 江油市 电信
高级用户
★★★
Credits 502
Posts 327
Joined 2006-12-30 06:01
19-year member
UID 74981
Gender Male
Status Offline
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 ]
Floor 4 Posted 2008-07-07 09:01 ·  中国 四川 绵阳 江油市 电信
高级用户
★★★
Credits 502
Posts 327
Joined 2006-12-30 06:01
19-year member
UID 74981
Gender Male
Status Offline
Forum Jump: