ASP ParentFolder ਸ਼ਰੀਫਤ
ਵਿਆਖਿਆ ਅਤੇ ਵਰਤੋਂ
ParentFolder ਸ਼ਰੀਫਤ ਲਈ ਨਿਰਧਾਰਿਤ ਫਾਇਲ ਜਾਂ ਫੋਲਡਰ ਦੇ ਮਾਤਾ ਫੋਲਡਰ ਲਈ folder ਆਬਜੈਕਟ ਵਾਪਸ ਦਿੰਦਾ ਹੈ。
ਵਿਭਾਵਨਾ:
FileObject.ParentFolder FolderObject.ParentFolder
ਮਾਮਲਾ
ਫਾਇਲ ਆਬਜੈਕਟ ਦੇ ਲਈ ਉਦਾਹਰਣ
<% dim fs,f set fs=Server.CreateObject("Scripting.FileSystemObject") set f=fs.GetFile("d:\asp\test\test.asp") Response.Write("The file test.asp is in the folder: ") Response.Write("}}")f.ParentFolder) set f=nothing set fs=nothing %>
ਆਉਟਪੁਟ:
The file test.asp is in the folder: D:\asp\test
ਫੋਲਡਰ ਆਬਜੈਕਟ ਦੇ ਲਈ ਉਦਾਹਰਣ
<% dim fs,fo set fs=Server.CreateObject("Scripting.FileSystemObject") set fo=fs.GetFolder("d:\asp\test") Response.Write(ਦਾਖਲਾਂ ਫੋਲਡਰ ਟੈਸਟ ਫੋਲਡਰ: ) Response.Write("}}")fo.ParentFolder) set fo=nothing set fs=nothing %>
ਆਉਟਪੁਟ:
ਫੋਲਡਰ ਟੈਸਟ ਫੋਲਡਰ ਵਿੱਚ ਹੈ: D:\asp