Save Files Preferences

On the Save Files tab in the Preferences screen, you can configure how EditPad should handle files when saving them.

Backup Copies

To make sure you never lose any data in case you change your mind after saving a file, you should turn on one of the options to create backup copies. The “single backup” options keep one backup copy of each file in the same folder as the original. The “multi backup” options keep multiple backup copies in the same folder. The “hidden history” option creates a hidden “__history” folder below each folder, and put the backup copies there. The “multi backup” and “hidden history” options work best with EditPad Pro’s File History. The File History lets you easily compare, delete and revert to backup copies.

By default, EditPad uses a quick method to make backups. It moves the original file into its backup location, and then writes the file you’re saving as a new file. This works just fine when editing files on your Windows PC or on a Windows server. It may cause issues if you’re editing a file on other systems, such as a Linux server that makes itself visible on the Windows network using Samba. It can also cause issues on Windows when editing files with special (security) attributes. When EditPad moves the file into a backup location and writes a new file, the newly saved file may not have the same UNIX file permissions or Windows security attributes of the original file. To prevent this, turn off “quick backups”. EditPad will then make backups by copying the original file, and the original file will be modified with the new text you’re saving.

When you save a project, EditPad Pro creates an .epp file. EditPad Pro then automatically saves this file at regular intervals. If you turn on the option “make backups of .epp project files” then EditPad Pro creates a backup copy of that .epp file before overwriting it. The backup is named according to the “single backup” or “multi backup” option that you selected. The backup is made only if the project hasn’t been backed up yet since you last opened it or if the previous backup was made on a previous day. So if you open and close the same project multiple times per day, you get one backup copy per session. If you keep the same project open for days on end without restarting EditPad Pro or your PC then you get one backup copy per day. The options for reducing and limiting backup copies and for putting them in a specific folder also apply to backup copies of .epp files.

When choosing “multi backup” or “hidden history”, you should enable one or more of the three backup limitation options to prevent an ever-increasing number of backup files from taking up too much disk space. The limits are enforced on the backup copies of one particular file when EditPad needs to create another backup copy of that file.

EditPad can selectively reduce backup copies based on their age. Backup copies older than your specified number of weeks will be reduced to one per week, keeping only the first backup made during each week. Backup copies older than your specified number of days will be reduced to one per day, keeping only the first backup made during each day. This reduction may reduce the backup copies below the maximum number or the maximum size that you specify.

The benefit of selectively weeding out backup copies this way is that it allows you to go back further in time with a given number of backup copies. Say you save a particular file 10 times a day, 5 days a week, over the course of a year. If you reduce backup copies to one a day after 7 days and to one a week after 4 weeks then you need to allow a total of 113 backup copies to keep a year’s worth of backups. If you just kept the 113 most recent backup copies then you’d only be able to go back two weeks and a day.

If you limit the number of backup copies for each original file then EditPad deletes the oldest backup copies to bring the total number under the limit if reducing them to one a day and one a week didn’t already sufficiently reduce the number of backup copies. The backup copy that is about to be created is counted towards the limit. So you’ll never have more backups than the number you specified.

If you limit the backup copies by size, then EditPad counts the total size of all the backup copies that remain after reducing them by age and reducing their number. EditPad then deletes the oldest remaining backup copies to bring the total size of the existing backups below the size limit that you specified. This may end up deleting all existing backup copies if the newest backup copy alone is larger than the total size limit. The size of the backup that is about to be created is not taken into account. This ensures that each file always has at least one backup copy, even if that backup copy alone is larger than the backup size limit. So after the limits are enforced and after the new backup copy is created, the total size of the backups of the file that was saved may exceed the size limit by the size of the most recent backup copy.

Normally, EditPad saves backups in the same folder as the original files, or in a hidden “__history” subfolder in that folder. If you’d like the backups to be created in a subfolder of the folder that contains the original file then turn on the “save backups in a specific folder or subfolder” option and type in the name of the subfolder. If you’d like all backups to be saved into a particular folder then turn on “save backups in a specific folder or subfolder” and specify the full path to the folder where you would like to keep your backup copies. To make sure there are no conflicts between backup copies of files with the same name saved in different folders, EditPad will create subfolders under the path you specify to organize the backup copies.

If you save backups on a separate drive and that drive is running low on disk space then you may want to use a file manager to delete all files older than a certain age and/or larger than a certain size. EditPad does no bookkeeping of its backup files. Deleting them using another application causes no issues. EditPad checks the backup folder for existing backup copies each time you save a file. In EditPad Pro you can also use the File History to delete all backup copies of the current file or project.

Closing Unsaved Files

The “closing files with unsaved files” option gives you three choices as to what EditPad should do when you try to close a file that was previously saved and to which you have made changes that were not yet saved to disk:

The option "closing empty files" is a special case for closing previously saved files that have unsaved changes that made the file completely empty. You get the same three choices. You may want to make a different choice. Prompts to save are intended to prevent data loss caused by forgetting to save your work. But if a file was made empty, accidentally or automatically saving the empty file could be a bigger risk as it deletes the data that was previously in the file.

The “closing untitled files” option gives you three similar choices as to what EditPad should do when you try to close a file that has never been saved and is not empty:

Windows 8 and later don’t really give applications the opportunity to prompt to save unsaved changes when you want to shut down or restart your PC (or Windows decides to restart on its own). If you have working copies enabled (see below), then EditPad does not prompt to save your changes when Windows shuts down or restarts. Instead it ensures that all working copies are up-to-date and then immediately allows Windows to proceed with the shutdown or restart. If you chose to automatically save or discard without prompting, then EditPad will do that instead when Windows shuts down or restarts.

Automatic Save

If you want EditPad Pro to automatically save your work regularly, select to save working copies. EditPad Pro then saves a copy of all modified files every couple of minutes. When working on Document.txt, a file “Working copy of Document.txt” is saved into the same folder as Document.txt. When you save Document.txt or close Document.txt without saving, the working copy is automatically deleted.

If the document is not properly closed, because of a power loss or a software crash, the working copy is not deleted. When you open Document.txt next time, EditPad Pro automatically opens both Document.txt and its working copy. You can then choose which file you want to keep and which you want to delete, possibly after using Extra|Compare Files to assist with your choice.

Enabling working copies is a particularly good idea when working on a laptop running on battery power. EditPad ensures that all working copies are saved when Windows notifies that your PC is going to sleep or into hibernation. This way you don’t lose any work if your laptop runs out of battery power while it was asleep.

Note: If you have both “Document.txt” and “Working copy of Document.txt” open in EditPad Pro, and you start editing the former, the latter is automatically overwritten after a few minutes. So if you want to keep the working copy, you should use File|Save As before editing the base document. If you don’t want to keep the working copy, use File|Delete to remove it.

If you’d like all working copies to be saved into a particular folder, turn on “save working copies in a specific folder or subfolder” and specify the full path to the folder where you would like to keep your working copies. If you’d like the working copies to be created in a subfolder of the folder that contains the original file and choose the name of that subfolder, turn on the “save working copies in a specific folder or subfolder” option and type in the name of the subfolder.

If you do not specify the full path to a folder for working copies then working copies of unsaved files are saved in the “specific folder” you have specified in the “folder to open for open and save dialog boxes for files” section on the Open Files tab in the Preferences, even if you have “most recently used folder” selected there. If you restart EditPad Pro after a system crash, the working copies of unsaved files are opened automatically when you start EditPad.

Instead of saving working copies every few minutes, you can tell EditPad to save the actual files every few minutes. If you use this option it’s probably best to also enable one of the “multi backup” options and not to restrict the number of backup copies by count or by size so you’ll have older backups to go back to if your edits don’t pan out. When EditPad saves actual files every few minutes it still creates working copies of untitled files at the same interval. If you save an untitled file then EditPad removes the working copy and starts saving the actual file at the specified interval.

If you want to continue working with the same set of files the next time you start EditPad Pro, turn on “automatically save and reopen workspace”. You can also choose the file into which EditPad Pro should have its workspace. The workspace contains a list of projects and files that you have open. The next time you start EditPad Pro, those projects and files are automatically reopened. If you restart EditPad Pro after a system crash, it opens the workspace along with all working copies of all files in the workspace.

Preserve File Status

By default, EditPad Pro remembers a whole bunch of status information for the files that you edit. This information is stored for all the files listed in the File|Open and File|Favorites submenus. It is also saved into .epp project files whenever you save a project. This way, each file will appear the next time you open it in EditPad Pro the way it did last time.

With “preserve file settings” turned on, EditPad Pro stores the settings from the Options menu that you’ve changed from their defaults in the file type configuration. With “preserve cursor position and folding” turned on, EditPad Pro remembers the position of the text cursor in the file, which part of the file was selected, bookmarks, and folding.

Opening large files may take a bit longer when preserving the cursor position, as EditPad Pro then has to scan the file for line breaks up to the cursor position before it can show the file. Because of this, EditPad Pro won’t remember the cursor position for files larger than the huge file threshold.