UltraEdit project file

From Just Solve the File Format Problem
Jump to: navigation, search
File Format
Name UltraEdit project file
Extension(s) .prj, .pui

UltraEdit project files are used by the UltraEdit text editor from IDM Computer Solutions to keep track of what files are open in a project, at what point in the files the user is scrolled to and where the cursor is, and how they are positioned on the screen.

Traditionally, projects were stored in files with the .prj extension, and that is still the sort of file that is shown in the file picker when creating, loading, and saving projects. However, somewhere around 2008 or so, newer versions of UltraEdit started using an additional file with a .pui extension (for Project User Interface) which doesn't appear in any of the file pick lists, but is automatically created in the same directory as the .prj file, and which appears to be where most of the "action" takes place regarding projects these days.

There does not appear to be any online documentation about UltraEdit project files, so all of this is "original research" based on examining the files. Wikipedia frowns on original research, but this ain't Wikipedia, so...


PRJ and PUI files

The .pui file, by default, is saved in a filename which includes the computer name and username as well as the project name. Thus, a project Stuff.prj will be accompanied by a file called something like Stuff-COMPUTERNAME-username.pui, where COMPUTERNAME is the name of the computer as configured in the operating system, and username is the currently logged-in user. There's apparently an option somewhere in the convoluted configurations of UltraEdit to disable this and just use the project name. In the default configuration, these files are user and machine specific, so that if a different user loads the same project, or you do it on a different machine, only the .prj file will load and not the accompanying .pui file; a new .pui file would be created with the machine/user involved.

This is significant because, unlike in the "old days" when all the relevant project info was stored in the .prj file, nowadays the important stuff seems mostly to be done in the .pui file. The .prj file gets altered only at the time you first create it, or explicitly edit and save it with the functions in the Project menu, while the .pui file gets continuously updated to keep track of the files that are open and what point you're located at in them. So if you load a project on the same machine and user, you'll return to the exact status you were in last time you used the project, while if you load it under a different user or machine you'll be whisked back to the project's state as of whenever you first created it or explicitly modified it, which might be very different. The idea seems to be to let multiple users work on a project and maintain separate state information.

File contents

Both the .prj and .pui files are in plain text (with CRLF line breaks), so they can be examined and modified in any plain text editor (including UltraEdit itself if you open it from the File menu instead of the Project menu). Don't try to edit a project file as plain text while that project is itself open as a project, since that will make UltraEdit clash with itself in altering the file, but it's OK to edit it there while no project (or a different project) is open.

The .prj and .pui files have similar contents, consisting mostly of lines with attribute names and values separated by an equal sign (=). The order seems different (the .prj files tend to have the different attributes relating to each file together, while the .pui file has all the attributes of a given type together) but this may not have significance.

There are also a few bracketed lines, which appear to identify major sections of the file. [Open Files] is where most of the data is, but the .pui file also has a [Project Information] section, and the .prj file has [Project ID] and [Group].

Group section

Not sure what this means; the only attribute noticed there so far is called "1" and has an empty value.

Open Files section

The filenames of the open files in the project can be found in Open Filen attributes, where n is a number. The attribute value is, very straightforwardly, the full name/path of the file including drive letter, like C:\files\somefile.txt. So, for instance, if you've just reorganized your system so that files are in a different place, or maybe a different drive, but you know that once you try to open an UltraEdit project that points at the old locations, UltraEdit will realize the files don't exist there any more, and "helpfully" close all of them leaving you with an empty project... well, you can prevent that by opening the project file as a text file and changing the paths to the new locations. So if you moved your files from drive C to drive D, a global replacement of "C:\" to "D:\" will work. These sorts of lines appear in both the .prj and .pui files, but the .pui file seems to be where UltraEdit actually loads its status from.

Known attributes in this section:

  • Active File Display Mode – A number; not sure what it means.
  • Active File Index – Another number; probably the file number of the one that is in the current tab/window with focus for editing.
  • Open Filen – Path/filename of file #n, with a file number starting at 0 and corresponding to the other attributes with the same number.
  • Open File Linen – The byte offset in file #n where the top of the edit window for that file is currently positioned.
  • Open File Posn – The byte offset in file #n where the edit cursor is currently positioned.
  • Open File Window Posn – Followed by ten numbers, comma-separated, some of which can be negative. It apparently has something to do with how the edit window is positioned for file #n.
  • Remember Files – Not sure what this means.

Project ID section

Known attributes in this section:

  • Signature – Has the string "UE Proj: v.1". Presumably it can theoretically vary in different versions, though since the only ones I've seen are "v.1", it doesn't seem to have yet.

Project Information section

Known attributes in this section:

  • Create Tagfile – Apparently a flag value of 0 or 1; not sure exactly what it means.
  • Filter – Not sure what this means.
  • Include Sub Directories – Apparently a flag value of 0 or 1; apparently indicates whether subdirectories of main project directory are also part of the project.
  • Project Directory – Main directory of files in project. (You can have files open from other places, though.)
  • Project StartWinAPI SystemTime structure followed by a checksum byte, formatted as quoted string of 34 hexadecimal characters. The SystemTime structure is defined as follows, 8 Little Endian Words [8x2 = 16 bytes] representing Year Month DayOfWeek Day Hour Minute Second Millisecond. The checksum byte is the sigma of the 16 bytes within the SystemTime structure.
  • Project Tagfile – Designates a file for tagging a project (for syntax highlighting?)
  • Project Wordfile – Designates a file for dictionary word-checking within this project.
  • Relative to Project File – Possibly a 1 or 0 flag; maybe indicating whether to use relative or absolute paths?
  • Use Relative Directory – Another flag having to do with use of relative directory paths.
  • Working Time – A fairly large number; not sure what it means.

See also

Links and references

Personal tools