ASP Move ਮੈਥਡ

ਪਰਿਭਾਸ਼ਾ ਅਤੇ ਵਰਤੋਂ

Move ਮੈਥਡ ਕਿਸੇ ਵੀ ਫਾਇਲ ਜਾਂ ਫੋਲਡਰ ਨੂੰ ਇੱਕ ਸਥਾਨ ਤੋਂ ਦੂਜੇ ਸਥਾਨ 'ਤੇ ਟ੍ਰਾਂਸਫਰ ਕਰਦਾ ਹੈ。

ਸਫਟਿਕਰਨ:

FileObject.Move(destination)
FolderObject.Move(destination)
ਪੈਰਾਮੀਟਰ ਵਰਣਨ
destination ਲਾਜ਼ਮੀ। ਫਾਇਲ/ਫੋਲਡਰ ਦੀ ਟਰਾਂਸਫਰ ਟੀਚਾ

ਉਦਾਹਰਣ

ਫਾਇਲ ਆਬਜੈਕਟ ਦੇ ਉਦਾਹਰਣ

<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
Set f=fs.GetFile("d:\test.txt")
f.Move("d:\test\test.txt")
set f=nothing
set fs=nothing
%>

ਫੋਲਡਰ ਆਬਜੈਕਟ ਦੇ ਉਦਾਹਰਣ

<%
dim fs,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("d:\test")
fo.Move("d:\asp\test")
set fo=nothing
set fs=nothing
%>