(available in EditPad Pro only)

The File|Tail command is very convenient for dealing with files that may be very large, that may be updated continuously, or that have the information you want at the end of the file. Log files are a prime example. Opening these files with File|Tail instead of File|Open can give you better performance by loading only the end of the file and can keep you up-to-date by continuously reloading that tail end.

File|Tail first shows a file selection dialog just like the File|Open command. After you’ve selected the file(s) you want to open, it shows a second dialog box pictured below. The options you choose in that dialog are applied to all the files that you selected.

You can choose whether you want EditPad Pro to load the entire file or only a certain number of megabytes at the end of the file. If the file is smaller than the size you specify then the file is loaded entirely. If it is larger then EditPad loads the number of megabytes you specified. It trims the loaded block at the first line break so you don’t end up with a partial first line.

If you tick “continuously reload the file(s) when modified on disk” then EditPad Pro checks whether the file has been modified on disk while you are viewing it at the interval that you specify. If it is then the file is reloaded immediately. This allows you to monitor live changes to the file. EditPad stops reloading the file if you switch to another file. It starts reloading the file again when you switch back to it. If the cursor is at the end of the file when it is reloaded, EditPad Pro keeps the cursor at the end of the file. This way you can watch text that is appended to the file scroll by.

If you don’t have EditPad Pro continuously reload the file then it will still reload the file when you switch to it or when you switch to EditPad from another application if you ticked the option to automatically reload files in the Open Files Preferences.

Regardless of whether you opt for automatic reload, you can always select File|Reload from Disk in the menu to reload the file at any time.

If you know for certain that other applications will only append to the file while you have it open in EditPad Pro, tick that option. Then when EditPad Pro reloads the file it first checks if the file is larger than last time it was loaded. If it is, only the part of the file between the previous size and the new size is loaded. For large files this will be significantly faster than reloading the entire file. It can enable you to set a shorter reload interval. The part of the file that was previously loaded is kept in memory even if you selected to load only a certain number of megabytes at the end of the file. EditPad Pro does not trim the part that it has loaded to stay under that limit.

If you don’t tick the option that files are only appended to when they grow, or if a file turns out to be smaller than last time it was loaded, then EditPad Pro discards what it has loaded before. If you selected to load the entire file then the entire file is reloaded. If you selected to load only the tail end, then EditPad Pro loads the same number of megabytes from the new tail end of the file. If you want to continuously reload at a short interval it’s best to have EditPad Pro load a small number of megabytes.

If you only load part of the file, have it continuously reloaded, or tell EditPad Pro to assume the file is only appended to then EditPad Pro gives the file’s tab a special “Tail” status. This basically makes the file read-only. If you want to edit the file, either close it and use File|Open to open the whole file normally. Or you can use File|Save As to save the file under a new name. If you loaded only the tail end of the file, then only that tail end is saved into the new file.

Recently Closed Files

The File|Tail command has its own submenu with recently closed files. Closing a file that you opened with File|Tail adds it to the top of the File|Tail submenu. Selecting a file from the submenu tails the file with the same settings that you used for it last time.

Opening a file with File|Open removes it from the File|Tail submenu. Opening a file with File|Tail removes it from the File|Open submenu. This way you don’t accidentally use the wrong command to reopen a particular file. By not having duplicates between the menus they can together remember more files.

See Also

File menu
File|Reload from Disk
Read-Only Files
Project|Add to Project