最新下载
热门教程
- 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
相关文章
- 辉烬知世怎么配队 知世配队攻略 10-31
- 口袋斗罗大陆独孤博技能是什么 独孤博技能介绍一览 10-31
- 王者万象棋香香怎么玩 香香玩法介绍 10-31
- 王者万象棋阵容怎么搭配 阵容搭配攻略 10-31
- 王者万象棋怎么玩 新手玩法攻略 10-31
- 植物大战僵尸2万圣节版本有哪些新植物 万圣节版本新植物介绍 10-31
 
             
                                 
                                 
                                 
                                 
                                            
                                         
                                            
                                         
                                            
                                         
                                            
                                         
                                            
                                         
                                            
                                         
                                            
                                         
                                            
                                         
                                            
                                        