最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
ASP ShortName 与 ShortPath属性实例教程
时间:2008-11-04 编辑:简简单单 来源:一聚教程网
ASP ShortName 与 ShortPath属性是取得文件短名或路径的
该ShortPath财产用于归还短路径指定的文件或文件夹( 8.3命名约定) 。
语法
FileObject.ShortPath
FolderObject.ShortPath
例如File对象
<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("c:asp_test_webhitcounterfile.txt")
Response.Write("Path: " & f.Path)
Response.Write("
ShortPath: " & f.ShortPath)
set f=nothing
set fs=nothing
%>
Output:
Path: C:asp_test_webhitcounterfile.txt
ShortPath: C:ASP_TE~1HITCOU~1.TXT
对文件夹操作一样的.下面来看看asp filesystemobject ShortName 属性吧.
该ShortName用于归还短名称指定的文件或文件夹( 8.3命名约定) 。
语法
FileObject.ShortName
FolderObject.ShortName
例如File对象
<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("c:hitcounterfile.txt"))
Response.Write("Name: " & f.Name)
Response.Write("
ShortName: " & f.ShortName)
set f=nothing
set fs=nothing
%>
Output:
Name: hitcounterfile.txt
ShortName: HITCOU~1.TXT
fso ShortName 属性 下面对文件夹实例教程
<%
dim fs,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:asp_test_web")
Response.Write("Name: " & fo.Name)
Response.Write("
ShortName: " & fo.ShortName)
set fo=nothing
set fs=nothing
%>Output:Name: asp_test_web
ShortName: ASP_TE~1
相关文章
- asp For Next语句实例 10-14
- asp For Each语句实例 10-14
- asp do while与while语句实例 10-14
- asp 上一篇,下一篇文章实例代码 04-16
- asp For Next 循环语句语法与实例 03-03
- asp do while 循环语法与do while实例教程 03-03