HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

ASP Name Property


Folder Object Reference Complete Folder Object Reference

The Name property is used to set or return the name of a specified file or folder.

Syntax

FileObject.Name[=newname]

FolderObject.Name[=newname]

Parameter Description
newname Optional. Specifies the name of the file or folder

Example for the File object

<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("c:\test.txt")
Response.Write("The file's name: ")
Response.Write(f.Name)
set f=nothing
set fs=nothing
%>

Output:

The file's name: test.txt

Example for the Folder object

<%
dim fs,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:\test")
Response.Write("The folder's name: ")
Response.Write(fo.Name)
set fo=nothing
set fs=nothing
%>

Output:

The folder's name: test


Folder Object Reference Complete Folder Object Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE