IDM PowerTips
Working with temporary files in UltraEdit/UEStudio
UltraEdit and UEStudio use temporary files… but what are temporary files? The following power tip provides an explanation as to why the editor uses temporary files as well as some tips to get the most out of temp files..
Using Tagged Expressions
What are temp files?
Temp(orary) files are a sort of “backup” file that UltraEdit creates and uses during your editing sessions on a per-file basis (when a file is opened) to store changes, while not actually changing the file on disk. Most editing software (Microsoft Word, Notepad, Dreamweaver, etc.) uses a temp file in order to provide undo (and other) functions. When you edit a file with temp files enabled, which is how UltraEdit works by default, you are actually editing the temp file and not the original source file stored on your hard drive. Once you save your changes, UltraEdit replaces the file on disk with the current temp file – almost like a version control system.
Why use temp files?
Without temp files, any changes you make to your file is written directly to the hard drive where it is stored, and every single keystroke that results in a change to the file is permanent. Additionally, when you open and edit a file directly on the hard drive on Windows systems, the operating system provides exclusive access of the file to the application that opened it, meaning no other application can open the file as it is “locked” by the program working with it. Temp files also provide file recovery; if you’re editing a file in UltraEdit and your computer crashes or reboots unexpectedly, the temp file in its last-modified state will still be available to you when you restart the application.
Some loss of functionality if you edit without temp files…
- Revert to saved is not available
- Save state (remembering and reloading unsaved changes between sessions) is not available
- File change detection and polling wouldn’t function
- The file would be locked by the operating system exclusively for UltraEdit and therefore unavailable for other users or applications
Where are temp files stored?
As of UltraEdit v25.20, temporary files are stored in your user-specific %APPDATA%\IDMComp\UltraEdit\Restore\ folder. Prior versions of UltraEdit store temp files in your system %temp% directory.
How do I turn temp files on or off?
You shouldn’t turn temp files off unless you are working with very large files or unless you simply don’t want to use temp files for a specific reason. If you are working with very large files with temp files enabled, then temp files may actually slow your system down as it copies the original source file into the temp file folder. If you aren’t using temp files, UltraEdit will warn you on file open that all of your changes will be permanent.
Should you wish to disable temporary files, you may do so by going to Advanced » Settings » File Handling » Temporary Files. Select either “Open file without temp file but prompt for each file…” or “Open file without temp file but NO prompt…“.
With either of these options set, you can then provide a filesize threshold for this setting. For instance, setting the “Threshold for above” option to 50000 will disable temp files ONLY for files exceeding 20 MB in size. This is highly recommended if you decide to disable temp files.
UltraEdit v14.20 and later provides an automatic detection mechanism to warn you that temp files are enabled when opening large files as shown in the screenshot below:
Here is an explanation of the options above:
1. Yes, for this session only
Selecting this option will turn off temporary files for this edit session only (your “edit session” ends when you close the application) for files that are over approximately 47 MB in size.
2. Yes, and don’t ask again
Selecting this option will turn off temporary files permanently for files that are over approximately 47 MB in size.
3. No, use temporary files when opening files larger than 47 MB
Selecting this option will keep temp files enabled for files exceeding 47 MB (all large files).