ວິທີການ Move ASP
ການອະທິບາຍແລະນຳໃຊ້
ວິທີການ Move ຈະປ່ຽນຕົວຂອງເຟີອຍຫຼືໂອວລາຍຈາກສະຖານທີ່ໜຶ່ງໄປສະຖານທີ່ອື່ນ.
ວິທີການ:
FileObject.Move(destination) FolderObject.Move(destination)
ພຽງພໍ | ອະທິບາຍ |
---|---|
destination | ຕ້ອງການ。ຈຸດໝາຍຂອງການເຄື່ອນຍ້າຍແບບເຟີອຍ/ໂອວລາຍ. ບໍ່ອະນຸຍາດນຳໃຊ້ສິ່ງກວດກາ. |
ບົດສະຫຼຸບ
ສະແດງຄວາມຈິງ FileObject
<% 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 %>
ສະແດງຄວາມຈິງ FolderObject
<% 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 %>