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-06-25 09:00
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » Does anyone have source code for renaming directories? View 2,071 Replies 4
Original Poster Posted 2002-11-11 00:00 ·  中国 河南 郑州 联通
初级用户
Credits 105
Posts 1
Joined 2002-11-11 00:00
23-year member
UID 222
Gender Male
Status Offline
C, Pascal, ASM... any of them is fine, thanks!!!
Floor 2 Posted 2002-11-27 00:00 ·  中国 广东 东莞 电信
中级用户
★★
Credits 493
Posts 161
Joined 2002-10-29 00:00
23-year member
UID 94
Gender Male
From ZHCN
Status Offline
/*Tested successfully in the Turbo C 2.0 environment. This program can not only rename folders (directories), but also rename files, though it may only work for DOS 8.3 filename format.*/
#include
#include
#include /*I also forgot which .h header files need to be included, just try it!*/
main(int argc,char *argv)
{
if(argc<=2)
{ printf("Parameter Error!\n";
printf("Usage:%s FileIN FileOUT",argv);
exit(1);
}
rename(argv,argv);
}









Floor 3 Posted 2002-11-27 00:00 ·  中国 浙江 宁波 联通
银牌会员
★★★
Credits 1,001
Posts 309
Joined 2002-11-19 00:00
23-year member
UID 283
Gender Male
Status Offline
Floor 4 Posted 2002-11-27 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
The REN command in MS-DOS 7.x can rename directories (folders).
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 5 Posted 2002-11-29 00:00 ·  中国 广东 东莞 电信
中级用户
★★
Credits 493
Posts 161
Joined 2002-10-29 00:00
23-year member
UID 94
Gender Male
From ZHCN
Status Offline
To each his own.
Forum Jump: