Returns the current position of the file pointer within the current line. Column 1 is the first character in each line.
The Column property returns the current position of the file pointer within the current line. Column 1 is the first character in each line.
The follwing code uses the Column property to get the column number of the last character in a text file.
<%
dim filesys, text, readfile, contents
set filesys = CreateObject("Scripting.FileSystemObject")
Set text = filesys.CreateTextFile("c:\somefile2.txt")
text.Write "Find the last character in the text file"
text.close
set readfile = filesys.OpenTextFile("c:\somefile2.txt", 1, false)
do while readfile.AtEndOfStream <> true
contents = readfile.Read(1)
col = readfile.Column -1
loop
readfile.close
Response.Write "The last character in the text file is '" contents "' and its column number is '" col "'."
%>
"The last character in the text file is 'e' and its column number is '40'."