关于Shell.Application对象的一些简单尝试
2010-09-07 15:00
267 查看
Set shellapp = CreateObject("Shell.Application")
'获取所有桌面的窗口:
Set oWindows = shellapp.Windows
'执行文件:
shellapp.ShellExecute("ipconfig.exe","/all")
shellapp.ShellExecute("notepad.exe")
'创建子文件夹:
sDir= "c:/automation"
set oFolder = shellapp.NameSpace(sDir)
oFolder.NewFolder("Newfolder")
'获取文件夹内容信息:
set oitems = oFolder.items
For each oitem in oitems
print oitem.name
Next
'以资源管理器的形式浏览指定的文件夹内容
shellapp.Explore "c:/automation"
'获取所有桌面的窗口:
Set oWindows = shellapp.Windows
'执行文件:
shellapp.ShellExecute("ipconfig.exe","/all")
shellapp.ShellExecute("notepad.exe")
'创建子文件夹:
sDir= "c:/automation"
set oFolder = shellapp.NameSpace(sDir)
oFolder.NewFolder("Newfolder")
'获取文件夹内容信息:
set oitems = oFolder.items
For each oitem in oitems
print oitem.name
Next
'以资源管理器的形式浏览指定的文件夹内容
shellapp.Explore "c:/automation"
相关文章推荐
- 关于ASP控件对象的一些简单操作
- 关于凸优化的一些简单概念
- 个人关于存储不同类型对象进行碰撞检测的一些思路
- Java中关于对象串行化的一些讨论
- 我的一些简单的shell脚本实例
- 关于SHELL中一些特殊的$打头的特殊变量
- JSP基本功 pageContext对象page,request,session,application四个域对象的使用及区别JSP运行原理和九大隐式对象及下载文件、访问次数的代码总结出el表达式简单
- 关于js中小问题与一些简单函数的用法
- 关于大批量数据处理的一些简单想法
- 关于凸优化的一些简单概念
- 关于jsp中session,application的简单介绍以及用法
- 【Cocoa(mac) Application 开发系列之二】总结一些常用控件以及简单在自定义View上绘制字符串
- 关于javascript对象的一些总结
- 关于C++中类与对象的一些讨论
- 关于挂载的一些简单试验
- asp中遍历一些对象(request,session,Application)
- 我的一些简单的shell脚本实例
- 关于面向对象,系统和程序线程的一些想法
- 我的一些简单的shell脚本实例
- 简单的new操作重载以及关于内存的一些体会