<% Set fso = CreateObject("Scripting.FileSystemObject") Set fldr = fso.GetFolder("c:/Program Files") Response.Write "父文件夹名字是:" & fldr & "<br>" If fldr.IsRootFolder = True Then Response.Write "该文件夹是一根文件夹" & "<br>" Else Response.Write "该文件夹不是根文件夹" & "<br>" End If Response.Write "驱动器名字是:" & fldr.Drive & "<br>" %> |
<% Set fso = CreateObject("Scripting.FileSystemObject") fso.CreateFolder ("c:/cnbruce") Response.Write "文件夹名为" & fso.GetBaseName("c:/cnbruce") %> |
<% Set fso = CreateObject("Scripting.FileSystemObject") fso.DeleteFolder("c:/cnbruce") Response.Write "文件夹已删除" %> |
<% dir=server.mappath("cnbruce") Set fso = CreateObject("Scripting.FileSystemObject") if (fso.FolderExists(dir)) then fso.DeleteFolder(dir) response.write("cnbruce文件夹已经删除") else fso.CreateFolder(dir) response.write("cnbruce文件夹已经建立") end if %> |
新闻热点
疑难解答