ASP Path ਪ੍ਰਤੀਯੋਗਿਤਾ
ਵਿਆਖਿਆ ਅਤੇ ਵਰਤੋਂ
Path ਪ੍ਰਤੀਯੋਗਿਤਾ ਲਈ ਵਰਤੀ ਜਾਂਦੀ ਹੈ ਕਿ ਵਿਸ਼ੇਸ਼ ਡਰਾਈਵਰ, ਫਾਈਲ ਜਾਂ ਫਾਈਲ ਦੇ ਪਥ ਨੂੰ ਵਾਪਸ ਦੇਣ।
ਟਿੱਪਣੀਆਂ:ਡਰਾਈਵਰ ਲਈ, ਪਥ ਮੂਲ ਡਿਰੈਕਟਰੀ ਨਹੀਂ ਸ਼ਾਮਲ ਕਰਦਾ। ਉਦਾਹਰਣ ਵਜੋਂ, ਸੀ ਡਰਾਈਵਰ ਦਾ ਪਥ C: ਹੈ, ਨਹੀਂ ਕਿ C:\。
ਸਫ਼ਟਿਕਰਨ:
DriveObject.Path FileObject.Path FolderObject.Path
ਇੰਸਟੈਂਸ
ਡਰਾਈਵ ਆਬਜੈਕਟ ਦੇ ਉਦਾਹਰਣ ਲਈ
<% dim fs,d set fs=Server.CreateObject("Scripting.FileSystemObject") set d=fs.GetDrive("c:") Response.Write("The path is " & d.Path) set d=nothing فارم سینٹ فا س نو تھنگ %>
آؤٹ پُٹ:
The path is C:
ਫਾਈਲ ਆਬਜੈਕਟ ਦੇ ਉਦਾਹਰਣ ਲਈ
<% dim fs,f set fs=Server.CreateObject("Scripting.FileSystemObject") set f=fs.GetFile("d:\asp\test\test.asp") ریسپونس ویٹ رائٹ( "The path is: " آند f.Path) set f=nothing فارم سینٹ فا س نو تھنگ %>
آؤٹ پُٹ:
The path is: D:\asp\test\test.asp
ਫੋਲਡਰ ਆਬਜੈਕਟ ਦੇ ਉਦਾਹਰਣ ਲਈ
<% dim fs,fo set fs=Server.CreateObject("Scripting.FileSystemObject") فارم او ایس فا س گٹ فولدر( "d:\asp\test") ریسپونس ویٹ رائٹ( "The path is: " آند فارم او پتھ) فارم او فا س نو تھنگ فارم سینٹ فا س نو تھنگ %>
آؤٹ پُٹ:
پتھ ہے: D:\asp\test