on error resume next
set wshshell=CreateObject("Wscript.shell")
set fso=Createobject("Scripting.FileSystemObject")
wshshell.run "cmd.exe"
'str="dir C:\"
str="abcdef"
wscript.sleep 1000
'for i=1 To len(str)
s=mid(str,1,len(str))
wshshell.sendkeys s
wscript.sleep 100
'next
wshshell.sendkeys "{enter}"
'根据是否需要回车,确定是否需要注释掉上面一行语句。