shell调用格式????

zuing 2001-07-19 07:10:08
path="g:\ping"
Shell "c:\windows\command\deltree.exe -y" & Path
Shell "c:\windows\command\deltree.exe -y path"
前面两个都不行。只用这样才行!
Shell "c:\windows\command\deltree.exe -y g:\ping"
那我要用变量应该怎么写啊?

...全文
115 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
yjokvb 2001-07-22
  • 打赏
  • 举报
回复
Dim filename As Integer
filename = Shell ("c:\windows\Write.exe")

即可打开写字板程序
qrsy2hc 2001-07-21
  • 打赏
  • 举报
回复
path="g:\ping"
你可以把“c:\windows\command\deltree.exe -y”赋予一个变量如:“comm=c:\windows\command\deltree.exe -y ”然后再定义一个新变量如:
new=comm+path 再用SHELL语句打开new变量如:
shell new


MonkeyLin 2001-07-21
  • 打赏
  • 举报
回复
我觉得是少了空格的缘故……
Leemaasn 2001-07-21
  • 打赏
  • 举报
回复
你为什么不用fso呢?
dim fso as new filesystemobject
if fso.folderexist("g:\ping") then
fso.deletefolder("g:\ping")
endif
这样不是更好吗?
a_geng 2001-07-20
  • 打赏
  • 举报
回复
用VB中得函数去删除不是更好吗?
zuing 2001-07-19
  • 打赏
  • 举报
回复
不会啊!应该调用了deltree可是目录没有被删除啊?
谢谢大家了!教教我吧!
kyuwong 2001-07-19
  • 打赏
  • 举报
回复
Shell "c:\windows\command\deltree.exe -y " & Path
xuboying 2001-07-19
  • 打赏
  • 举报
回复
Shell "c:\windows\command\deltree.exe -y" & Path是不是少了空格?


7,763

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧