在dos下,输入XXX.exe /参数 >>c:\outputfile可以讲结果输出到文件
但是在vb的shell命令里面 >>不起作用,请问有没有其他办法

解决方案 »

  1.   

    shell "XXX.exe /参数 >>c:\outputfile "
      

  2.   

    错了 
    shell """&"XXX.exe /参数 >>c:\outputfile "&"""
      

  3.   

    http://community.csdn.net/Expert/topic/4202/4202317.xml?temp=.1383173
      

  4.   

    shell """&"XXX.exe /参数 >>c:\outputfile "&"""
    或到网上搜一下
      

  5.   

    like this:Private Sub Command1_Click()If Dir("d:\xxxx.txt") > "" Then Kill "d:\xxxx.txt"Shell "cmd.exe /C cd && dir  c:\download\*.* /b >> d:\xxxx.txt"Shell "notepad.exe d:\xxxx.txt", vbNormalFocusEnd Sub