当前位置: 移动技术网 > IT编程>网络>Dos/Bat > 重定向符(、)的使用

重定向符(、)的使用

2017年12月12日  | 移动技术网IT编程  | 我要评论
(1)、拷贝文件:
       type file1 〉file2 ;产生 file2 文件
       type file1 〉〉file2 ;在 file2 文件后追加
      (2)、建立文件:
       echo numline = 10 〉starts.bas
       echo for i = 1 to numline 〉〉starts.bas
       echo thestr = ""〉〉starts.bas
       echo for j = 1 to 2 * i - 1 〉〉starts.bas
       echo thestr = thestr + "*"〉〉starts.bas
       echo next 〉〉starts.bas
       echo ? space(numline - i) + thestr 〉〉starts.bas
       echo next 〉〉starts.bas
      (3)、输出到打印机:
       copy starts.bas 〉prn
       或 copy starts.bas 〉lpt1

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网