![]() |
中国DOS联盟-- 联合DOS 推动DOS 发展DOS --联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum |
| 游客 | 登录 | 注册 | 会员 | 搜索 | 中国DOS联盟 |
|
中国DOS联盟论坛 现在时间是 2026-09-23 14:41 |
共 47,812 主题排行 / 349,917 发帖 / 今日 0 篇 / 48,273 会员排行 |
| DOS批处理 & 脚本技术(批处理室) » (已结)Need helps in "Dos Batch File" |
| 可打印版本 1,607 / 5 |
| 第1楼 ngen | 发表于 2005-09-12 07:39 |
| 初级用户 发帖 8 积分 38 | |
|
(已结)Need helps in "Dos Batch File" Part A: Analysis & Research
Examine any Delphi application directories of your choice used in Programming 1, or refer to the copy area for directory examples. Find out which files are necessary to be: • included in a distribution of simple Delphi applications (ie. without ActiveX, DLL or Databases support via Delphi’s BDE) • kept as source code so that Delphi 7.x can re-build the project. Your task is to write a batch file that will delete (only) the Delphi files in the current directory which are not needed to run a Delphi application, or to rebuild the application from the source files. No other files should be deleted. The batch file should be named DCLEANUP.BAT, and has one optional parameter “/S” (Safe mode). After running DCLEANUP /S The current directory should contain only: • The files necessary for the distribution of an application (i.e. the .exe , .dll file & any data files) • The files that would allow Delphi 7.x to re-build the project, including extra files whose extensions are : *.res, *.cfg and *.dof. • Any other non-Delphi files (e.g. .dat, gif, jpg, htm,…) that were there previously. After running DCLEANUP The current directory should contain: • The minimum collection of files that would allow Delphi 7.x to re-build the project (i.e. without extra files). • Any other non-Delphi files (e.g. .dat, gif, jpg, htm,…) that were there previously. In both cases, all normal DOS output to the screen should be suppressed. After running DCLEANUP /? only help information related to usage of the program should be displayed without any file deletion. If DCLEANUP.BAT file is renamed, then help information would automatically display its correct file name. [ Last edited by willsort on 2005-9-18 at 18:42 ] |
|
| 第2楼 willsort | 发表于 2005-09-12 16:49 |
| 元老会员 发帖 1,512 积分 4,432 | |
|
Re ngen:
没有 Delph 的使用经验,无法确知哪些文件应该删除,而哪些应该保留?而这些文件的信息又可以从哪些途径可以找到? 如果你能提供更详细的信息,也许我可以写一个相关的批处理程序。 |
|
| 第3楼 ngen | 发表于 2005-09-13 04:35 |
| 初级用户 发帖 8 积分 38 | |
|
How to create a programn that delete specific files such *.exe or *sys... etc?
|
|
| 第4楼 willsort | 发表于 2005-09-13 08:48 |
| 元老会员 发帖 1,512 积分 4,432 | |
|
Re ngen:
如果只是删除某几类扩展名相同的文件,那么问题要简单一些: 但是根据你在主楼的要求,似乎这样的处理未免简单了些。 |
|
| 第5楼 ngen | 发表于 2005-09-13 10:56 |
| 初级用户 发帖 8 积分 38 | |
|
What about this, does it sounds good:
" IF '%1' == '/?' GOTO Help IF '%1' == '/s' GOTO s :Start del files *.~ddp, *.~dfm, *.~pas, *.dcu, *.dof, *.cfg, *.res, *.ddp, *.dll, *.exe GOTO End :Help echo delete the following files from the Delphi application GOTO End :s del files *.~ddp, *.~dfm, *.~pas, *.dcu GOTO End :End pause " |
|
| 第6楼 willsort | 发表于 2005-09-13 15:12 |
| 元老会员 发帖 1,512 积分 4,432 | |
|
Re ngen:
那么试试下面的代码吧: |
|
|
[ 联系联盟系统管理团队 -
中国DOS联盟 -
标准版 ] Sponsored by ifanr Inc | © 2001–2023 |