最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
ASP ShortName 与 ShortPath属性实例教程
时间:2022-06-30 11:42:39 编辑:袖梨 来源:一聚教程网
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
相关文章
- 《QQ》情侣空间历史情侣查看方法 08-02
- win11系统防火墙在哪里关闭?win11关闭防火墙和杀毒软件方法 08-02
- 澳大利亚证券投资委员会警告Bitget在澳提供“未经许可”的高杠杆加密货币期货产品 08-02
- 《怪兽大联盟》开荒推图阵容推荐 08-02
- win11自带的应用商店不能用为什么 win11无法打开应用商店如何解决 08-02
- 《QQ》资料卡背景封面设置方法 08-02