아는 것이 좋은 것이다.

[ASP] 파일이동, 폴더이동, 파일삭제 본문

ASP

[ASP] 파일이동, 폴더이동, 파일삭제

start0 2014. 4. 27. 12:25
<%
'Response.write Server.Mappath("\") & "\aaa"
Set fso = Server.CreateObject("Scripting.FileSystemObject")
'폴더이동
fso.MoveFolder  Server.Mappath("/") & "\aaa",Server.Mappath("/") & "\bbb"  ' 절대경로 원본폴더명,절대경로 타겟폴더명
'파일이동
fso.MoveFile  Server.Mappath("/") & "\aaa\img.jpg", Server.Mappath("/") & "\bbb\img.jpg" ' 절대경로포함 원본파일, 절대경로포함 파일이름
'폴더삭제
fso.DeleteFolder(Server.Mappath("/") & "\aaa") ' 절대경로 포함 삭제할 폴더명
 
%>
Comments