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-01 01:53
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » Looking for a DOS program under cmd to split and merge files! View 7,962 Replies 21
Original Poster Posted 2006-12-20 06:01 ·  中国 江苏 南京 电信
高级用户
★★
Credits 623
Posts 214
Joined 2006-09-22 20:48
19-year member
UID 63387
Status Offline
Experts in DOS programming, I want a DOS program that splits files under cmd. Put it as a system file in system32. The functions are as follows:
1. Split files with specified size (basic function)
2. Merge split files (this program can be used to merge and also can be merged with the copy command)
3. Audio and video and other files can be played normally after splitting.
4. Customize the storage directory of split files.
Friends who are proficient in programming, it shouldn't be difficult to compile such a program. Help me with this favor, thank you!!!
Floor 2 Posted 2006-12-20 07:58 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Well, lxmxn is developing this thing, and it might come out soon~~
Floor 3 Posted 2006-12-20 09:17 ·  中国 上海 闵行区 电信
中级用户
★★
大师兄
Credits 377
Posts 99
Joined 2005-08-26 07:37
20-year member
UID 41945
Status Offline
Using split:

C:>split -a1 -b3m Jay-HairLikeSnow.mp3 发如雪
Attachments
split.zip (8.09 KiB, Credits to download 1 pts, Downloads: 143)
Floor 4 Posted 2006-12-20 09:25 ·  中国 江苏 南京 电信
高级用户
★★
Credits 623
Posts 214
Joined 2006-09-22 20:48
19-year member
UID 63387
Status Offline
Great guy, thanks.... Is this written by yourself? I can't find it online. Can you write a similar program in C language? I want this code, please help...
Floor 5 Posted 2006-12-21 09:50 ·  中国 甘肃 张掖 电信
金牌会员
★★★★
Credits 4,103
Posts 1,744
Joined 2006-01-20 13:00
20-year member
UID 49241
Gender Male
From 甘肃.临泽
Status Offline
The split is something that's been around for a long time. I remember that what we're using now is still the one released a few years ago, but it's really useful. For merging, you can use copy /b
Floor 6 Posted 2006-12-21 23:52 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
lxmxn is using a version of WinRAR


::code by lxmxn @ cn-dos.net
::Divide file into pieces.
@echo off&setlocal EnableDelayedExpansion
if not "%~s1"=="" (
echo %~s1
set "file=%~s1"
goto last
) else (goto begin)
:begin
cls
set /p file=Please enter the file name you want to split:
:last
for /f "delims=" %%i in ("%file%") do (
echo %%i
set filename=%%~nxi
set filesize=%%~zi
set name=%%~ni
set yslj=%%~dpi
set /a kbsize=%%~zi/1024
echo !yslj!
)
:redo
set /p fen= The size of the %filename% file is %filesize% bytes (approximately %kbsize% KB), please enter the size of the file you want to separate:
if %fen% gtr %filesize% (
cls
echo Incorrect input, please re-enter~
goto :redo
)
set /a over=%filesize%/%fen%
set /a over_=%over%+1
set /p choose=Approximately, %over_% files can be split from %filename%, continue? /
echo.&echo.
if /i not "%choose%"=="y" goto :end
if exist new_%name%\*.rar del new_%name%\*.rar /a /q
md new_%name% 2>nul
if %over_% geq 1 if %over_% leq 9 set num=1
if %over_% geq 10 if %over_% leq 99 set num=01
if %over_% geq 100 if %over_% leq 999 set num=001
if %over_% geq 1000 if %over_% leq 9999 set num=0001
rar a /v%fen%b /df /m0 /inul new_%name%\new_%name%.rar %file%
set /p choose1=Do you want to merge the split files? /
echo.&echo.
if /i not "%choose1%"=="y" goto :end
rar x /kb /df /inul new_%name%\new_%name%.part%num%.rar "%yslj%"
pause&endlocal
goto :eof
:end
set /p _=Operation canceled……
start.
goto :eof

Floor 7 Posted 2006-12-23 13:22 ·  中国 北京 鹏博士宽带
初级用户
Credits 160
Posts 36
Joined 2006-12-23 12:07
19-year member
UID 74361
Gender Male
Status Offline
Thanks
Floor 8 Posted 2007-01-10 10:34 ·  中国 北京 北京京宽网络科技有限公司
中级用户
★★
Credits 250
Posts 54
Joined 2003-06-08 12:00
23-year member
UID 4318
Gender Male
Status Offline
I used to write one with BC3.0, but the source code? Mainly used to 'display Chinese in the character interface', written for programming practice, wait for me to recompile it and put it up later. :P

[ Last edited by 陈沫 on 2008-2-17 at 01:33 AM ]
http://lingding.vicp.net
或许能帮你忙
Floor 9 Posted 2007-03-30 04:57 ·  中国 广东 中山 电信
新手上路
Credits 2
Posts 1
Joined 2007-03-30 04:25
19-year member
UID 83351
Gender Male
Status Offline
Just what I needed, not sure if it will work, thanks the LZ
Floor 10 Posted 2007-05-11 17:29 ·  中国 江苏 连云港 电信
高级用户
★★★
前进者
Credits 641
Posts 303
Joined 2007-01-10 02:57
19-year member
UID 76009
Gender Male
Status Offline
Does split have Chinese parameter explanations? I don't quite understand the English.
我相信总有一天,总会遇到一个人可以相濡以沫、相吻以湿!
Floor 11 Posted 2007-11-13 15:37 ·  中国 安徽 合肥 电信
新手上路
Credits 2
Posts 1
Joined 2007-11-12 16:10
18-year member
UID 102450
Gender Male
Status Offline
Great stuff, thanks a lot!
Floor 12 Posted 2007-11-25 00:21 ·  中国 江苏 南京 电信
新手上路
Credits 10
Posts 5
Joined 2007-11-25 00:00
18-year member
UID 103672
Gender Male
Status Offline
I want to, but I don't have points
Floor 13 Posted 2007-11-26 14:28 ·  IANA 局域网IP(Private-Use)
新手上路
Credits 10
Posts 5
Joined 2007-11-25 00:00
18-year member
UID 103672
Gender Male
Status Offline
Why do I only get an empty folder when I use it?
Floor 14 Posted 2007-11-28 09:13 ·  IANA 局域网IP(Private-Use)
新手上路
Credits 10
Posts 5
Joined 2007-11-25 00:00
18-year member
UID 103672
Gender Male
Status Offline
Split and Merge

@echo off
copy rar.exe split.exe c:\windows\
set /p file=Please enter the file name to split
rar a -m0 %file%
ping 127.0.0.1 -n 4>nul
split %file%.rar --b10000000 --part'.
ping 127.0.0.1 -n 4>nul
if exist part'.aa copy /b 01.jpg+part'.aa part01.jpg
md \01\ \02\ \03\
move part??.jpg \01\ %file% \02\ %file%.rar \03\
Floor 15 Posted 2007-12-12 03:28 ·  中国 浙江 温州 电信
新手上路
Credits 4
Posts 2
Joined 2007-12-02 00:12
18-year member
UID 104398
Gender Male
Status Offline
Forum Jump: