OpenTextFile method는 명시된 파일을 열고 파일에 접근하기 위해 사용되어지는 TextStream object를 반환한다.
Syntax
FileSystemObject.OpenTextFile(fname,mode,create,format) |
Parameter |
Description |
fname |
Required. 열 파일의 이름 |
mode |
선택사항. 파일을 여는 방법 8=ForAppending – 파일을 열고 파일의 마지막에 쓴다 |
create |
선택사항. 파일이름이 존재하지 않을 경우 새로운 파일을 생성할 지를 설정한다. True는 새로운 파일이 생성될 수 있다는 것을 나타내고, False는 새로운 파일이 생성될 수 없다는 것을 나타낸다. False는 default이다. |
format |
선택사항. 파일의 양식 |
Examples
<% dim fs,f set fs=Server.CreateObject("Scripting.FileSystemObject") set f=fs.OpenTextFile(Server.MapPath("testread.txt"),8,true) f.WriteLine("This text will be added to the end of file") f.Close set f=Nothing set fs=Nothing %> |
원본 사이트 : http://www.w3schools.com/asp/met_opentextfile.asp
[출처] ASP OpenTextFile Method|작성자 드림노마드