View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tim Williams Tim Williams is offline
external usenet poster
 
Posts: 1,588
Default Smart way to delete the first row of a huge file

I think you're pretty much stuck with how you're doing it now.
How large is the file. Do you mean hours literally ?

Tim


"Charles" wrote in message
...
Hello

Would anyone know a better way to remove the first line of a huge txt
file?

I am using a FileSystemObject/TextStream, doing a first readline, and
then looping:
Destination.WriteLine Source.ReadLine

but the two files are located on drives and it is taking hours to run.
Is anyone aware of a smarter way? (I guess the solution would be to
directly delete the first row in a file and save the change...without
loading it all to memory, but not sure of how to achieve that)

Thanks in advance
Charles