zoukankan      html  css  js  c++  java
  • vb 生成 批处理

    引用:http://www.ooppoo.com/html/60/n-25960.html

    想通过VB的Form界面输入变量 
    然后生成一个批处理文件 
    可以让比处理文件接受变量 
    再执行批处理, 
    这是我现在想实现的一个过程, 
    不知道能否完成, 
    望高人指点! 


    ----------------------------------------------------------------------

    没有问题啊 写完了保存成“.bat”文件就可以了啊! 

    --------------------------------------------------------

    这是执行dir/w命令的程序: 
    strCmd = "dir/w" 
    Open "c:\command.bat" for output as #1 
    Print #1, strCmd 
    Close #1 
    Shell "c:\command.bat" '传入参数可以这样:Shell "c:\command.bat /参数" 

    --------------------------------------------------------

    Option Explicit 
    Dim pcl(4) As String 
    Dim i As Integer 
    Dim n As Integer 

    Private Sub Command1_Click() 
    n = InputBox("输入批处理命令条数" ) 
    For i = 1 To n 
    pcl(i) = InputBox("输入批处理命令" & i) 
    Next 
    Open "c:\CopyMl.bat" For Output As #1 
    For i = 1 To 2 
    Print #1, pcl(i) 
    Next 
    Close 
    Shell ("c:\CopyMl.bat") 
    End Sub 

  • 相关阅读:
    软件开发术语
    网络规划与设计
    MPLS LDP协议
    MPLS 基础
    CallAfter
    LongRunningTasks
    Non-blocking GUI
    WorkingWithThreads
    Python: Running Ping, Traceroute and More
    wxPython and Threads
  • 原文地址:https://www.cnblogs.com/sode/p/2324465.html
Copyright © 2011-2022 走看看