Return Last 50 lines of a file?

(imported topic written by SystemAdmin)

how would i return the last X lines of a file ?

(imported comment written by Lee Wei)

Try this:

lines whose (line number of it > (number of lines of file "c:\temp\20090719.log") - 50 ) of file "c:\temp\20090719.log"

(imported comment written by SystemAdmin)

That worked… I figured out how to get the last # days

Q: lines whose (current date -(last 2 of first 6 of it as integer as day_of_month & first 3 of it as month & current year) < 2*day) of file “c:\temp\20090719.log”

the problem was the date in the file was formated funny

now I just need to figure out how to get at the file… its locked by the service

is there a way in an analysis to make a copy of a file grab the lines then delete it ?