Possible Duplicate:
Text Editor for very big file - Windows

NOt a programming question I know but related to a program I am writing, and probably a problem only likely to be encountered by programmers.

I have a really big text file which I need to edit - just need to delete the first line.

None of the standard windows programs can handle the 200MB+ file

What is the best way to edit it?


Use the sed command:

sed 1d largefile > newfile
mv newfile largefile

If you don't have sed, get Cygwin or UnxUtils for Windows.

  • if you are going to edit just 1 line and you know exactly where the line is, its far easier to use sed rather than opening the file in an interactive editor. Oct 5 '09 at 8:25

See Most powerful Notepad / Text Editor replacement for Windows and Why.


Then don't use a 'standard windows program'.

I've use vim in Cygwin under Windows XP to edit a 400MB file.

I don't want to do it regularly, but it worked.

EDIT: Of course, installing Cygwin just so you can edit a file is probably too much, but you should consider non standard Windows programs.

I'm not sure what the limitation of Notepad++ is, and you may consider it a 'standard', but there may be a modern third-party editor which will do the job.

  • 1
    Don't be snarky.
    – Sam152
    Oct 5 '09 at 7:10
  • I don't see why that's snarky (whatever that means) I'm saying don't use a standard Windows program, use a non-standard Windows program.
    – pavium
    Oct 5 '09 at 7:21
  • 1
    You can also install gvim under windows without cygwin. It should work just as well. Oct 5 '09 at 9:24

UltraEdit (commercial) handles large files rather well.


You should be able to use a ".vbs" script to do this. (Feel free to correct me on this one - I haven't checked the code properly)

Create a file called CopyAllButLine1.vbs, and enter the following: ({firstfile} and {secondfile} are the names of your files)

Set objFile = objFSO.OpenTextFile ("{firstfile}", 1)
Set outfile = objFSO.OpenTextFile ("{secondfile}")
strNextLine = objFile.Readline
Do Until objFile.AtEndOfStream
    strNextLine = objFile.Readline

Then double click your .VBS file.


There is an editor, available either in Lite version or Professional version. This is EditPad pro from JGSoft. I registered it several years ago and kept registering the upgrades as well.




I've used Large Text File Viewer for reading huge server logs in the past. It doesn't require an install and is pretty simple to use.

Not the answer you're looking for? Browse other questions tagged or ask your own question.