创建目录/文件夹.
DirCreate ( "路径" )
路径 | 创建目录的路径. |
成功: | 返回 1. |
失败: | 返回 0, 创建目录错误. |
$sFldr1 =
"C:\Test1\"
$sFldr2 =
"C:\Test1\Folder1\"
$sFldr3 =
"C:\Test1\Folder1\Folder2\"
If DirGetSize($sFldr1) = -1
Then
DirCreate($sFldr3)
$explorer = RunWait("explorer /root, C:\Test1\Folder1")
$handle = WinGetHandle($explorer)
MsgBox( 262144, "消息", "资源管理器打开时显示子文件夹 Folder2.")
DirRemove($sFldr3, 1)
MsgBox(262144, "消息", "子文件夹:Folder2 已删除.")
WinClose($handle)
DirRemove($sFldr2, 1) ;
清理测试文件夹
DirRemove($sFldr1, 1) ;
清理测试文件夹
Else
MsgBox(48, $sFldr1, "目录已存在!")
EndIf
provider with jb51.net (unicode) |