伊图教程网[www.etoow.com]
http://www.etoow.com/html/2008-08/1218591613-1.html
</html>
本实例运行结果如下:
驱动器名称是:c:
取得某个指定路径的父文件夹的名称
本例演示如何使用GetParentFolderName方法来取得某个指定的路径的父文件夹的名称。
本示例代码如下:
<html>
<body>
<%
Set fs=Server.CreateObject("Scripting.FileSystemObject")
p=fs.GetParentFolderName("c:\winnt\cursors\3dgarro.cur")
Response.Write("c:\windows\cursors\abc.cur 的父文件夹名称是:" & p)
set fs=nothing
%>
</body>
</html>
本实例运行结果如下:
c:\windows\cursors\abc.cur 的父文件夹名称是:c:\winnt\cursors
取得文件夹扩展名
本例演示如何使用GetExtensionName方法来取得指定的路径中的最后一个成分的文件扩展名。
本示例代码如下:
ASP实例教程:FileSystemObject对象
'http://www.etoow.com/html/2008-08/1218591613-1.html