Log users IP address
This ASP example will retrieve a visitors IP address and store it in a file called log.txt. Note that the text file has to exist, you could of course create this or have some sort of validation that the file exists first.
<%
IPAddress=Request.ServerVariables (”REMOTE_ADDR”)
Set objFSO = CreateObject(”Scripting.FileSystemObject”)
Set objFile = objFSO.OpenTextFile(”c:\log.txt”, forappending)
objFile.WriteLine (IPAddress)
objFile.close
Set objFile=nothing
Set objFSO=nothing
%>
Bookmark It
Hide Sites
[ Back to top ]
Delete a file using ASP
This example shows how to delete a file using ASP. change the file and location in the code for your own purposes.
<%
Set objFSO = CreateObject(”Scripting.FileSystemObject”)
objFSO.DeleteFile “d:\test.txt”, True
%>
Bookmark It
Hide Sites
[ Back to top ]
Create a folder with ASP
This snippet shows hot to create a folder in ASP
<%
Dim fso
Set fso = CreateObject(”Scripting.FileSystemObject”)
fso.CreateFolder(”d:\New Folder1″)
%>
Bookmark It
Hide Sites
[ Back to top ]




























