ASP Path প্রয়োজনীয়তা

সংজ্ঞা ও ব্যবহার

Path প্রয়োজনীয়তা ব্যবহার করে নির্দিষ্ট ড্রাইভ, ফাইল বা ফোল্ডারের পাথ ফিরিয়ে দেয়。

মন্তব্যঃড্রাইভার জন্য, পাথ রূপরেখা মূল ডিরেক্টরি নিয়ে থাকে। উদাহরণস্বরূপ, C ড্রাইভের পাথ 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
set fs=nothing
%>

আউটপুট:

পাথ হল C:

ফাইল অবজেক্টের উদাহরণ

<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("c:\asp\test\test.asp")
Response.Write("The path is: " & f.Path)
set f=nothing
set fs=nothing
%>

আউটপুট:

পাথ হল: C:\asp\test\test.asp

ফোল্ডার অবজেক্টের উদাহরণ

<%
dim fs,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:\asp\test")
Response.Write("The path is: " & fo.Path)
set fo=nothing
set fs=nothing
%>

আউটপুট:

পথ: C:\asp\test