<% if countlen < 6 then for i=1 to (6-countlen) %> <% next end if for i=1 to countlen %> <% next %> <% count=count+1 Set fs = CreateObject("Scripting.FileSystemObject") Set a=fs.createTextfile(server.mappath("count.txt")) a.writeline (count) %>