DOS命令:如何创建批处理文件或脚本 [英] DOS Command: How to Create Batch Files or Scripts

查看:159
本文介绍了DOS命令:如何创建批处理文件或脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我有几个问题要问你。我希望你们能帮我解决这两个问题。



1.如何创建一个批处理文件,用你的名字和不同的颜色填充整个屏幕。



2.如何创建一个批处理文件,在驱动器c中创建一个名为chanel的目录:然后将驱动器c中的所有文件复制到.bat中的所有文件到目录chanel并显示复制的所有文件?



期待您的回复。

解决方案

请参阅我对这个问题的评论。我不建议玩批处理文件的颜色和窗口大小。



以下是你可以做的:



运行由Rob van der Woude创建的批处理文件:

http://www.robvanderwoude .com / allhelp.php [ ^ ]。



它将生成文件allhelp.htm,其中包含从当前版本的操作系统收集的批量编程的所有帮助信息。学习内容。转到上面引用的网站;它可以帮助学习批量编程。



参见:

http://en.wikipedia.org/wiki/Batch_file [ ^ ],

http://www.dreamincode.net/forums/topic/55203-batch-tutorial-part-1 [ ^ ]。



这是一个有用的免于其他资源: http://www.netikka.net/tsneti/http/tsnetihttpprog.php#batch [ ^ ]。



最后的建议:不要沉迷于批量编程,通过编写简短的脚本来节省时间帮助您完成简单的重复任务(例如构建),更重要的是,不要再进一步了。请记住,您需要学习批量编程,主要是为了更好地了解操作系统的使用情况,而不是成为批处理艺术家。相反,专注于真正的编程,计算机科学和其他更有用和基本的东西。



-SA

Hello Everyone,

I have a couple of questions for you. I hope you guys can help me with these 2 questions.

1. How to create a batch file that will fill the entire screen with your name and with different colors.

2. How to create a batch file that will create a directory named chanel in drive c: then copy all files in drive c: that ends in .bat to the directory chanel and display all files copied?

Looking forward to hearing from you.

解决方案

Please see my comment to the question. I would not advise to play with colors and window size for batch files.

Here is what you can do:

Run this batch file created by Rob van der Woude:
http://www.robvanderwoude.com/allhelp.php[^].

It will generate the file "allhelp.htm" which contain all the help information on the batch programming collected from your current version of OS. Learn the content. Go to the site referenced above; it could be a good help in learning batch programming.

See also:
http://en.wikipedia.org/wiki/Batch_file[^],
http://www.dreamincode.net/forums/topic/55203-batch-tutorial-part-1[^].

This is a useful lest of other resources: http://www.netikka.net/tsneti/http/tsnetihttpprog.php#batch[^].

Final advice: don't get addicted to batch programming, save your time by writing short scripts helping you to do simple repeated tasks (such as build) and, even more importantly, don't go any further. Remember, you need to learn batch programming mostly to know the usage of your OS better, not to become a batch artist. Instead, focus on real programming, computer science and other more useful and fundamental things.

—SA


这篇关于DOS命令:如何创建批处理文件或脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆