Files and Filenames

The structure of the data filenames has evolved over the past 15 years. Initially, we were limited to 8 character filenames, with a 3 character extension, so we chose a basic structure made of the following parts"

The files would be put into a folder with a name based on the first 5 characters shown above.

For example, the 5 diffraction file for the 3rd MGO run would be labeled MGO03005.MCA., and would be in the MGO03 or MGO_03 folder

The implementation of the IDL MCA program changed this, because it made the file increment the extension, rather than part of the filename. Because it runs on a version of Windows which relaxed the 8.3 filename convention, we change the filename convention. The above example would now be named MGO_03.005. It could, however, also be called MGO_plus_nacl_003.005, or anything else deemed suitable.

Recently (September, 2006), a routine which allows automatic data collection was implemented. This routine would allow the user to tell the system to collect many (e.g. hundreds of) files, each with a predetermined data collection time. It would automatically increment the filename. It was necessary to modify both data-saving procedures, to keep the filenames in sync. We figured out how the filename incrementation worked, so we changed it back to the earlier style, with longer filenames. In addition, we chose the extension MED (for Multi Element Detector), to distinguish it from the MCA format inherited from the old SAM85 program.

Effective September 22, 2006, the filename format was changed to:

Even though Windows allows file and folder names to include spaces, not all programs (such as Plot85) running under windows do; therefore it is essential that no file or folder names include any spaces (or dots or apostrophes, etc.). An underscore is the usual replacement for a space in "computerese".

Thus the above example would be: MGO__003_0005.MED. This allows more than 999 files for one experiment, and more than 99 experiments for one material.

Finally, running the Startup program creates the filename and path, and writes them into a file called "LastFileWritten.TXT" in the root of SAMDATA. The file-saving routines read and update this file, so the current filename is always known.

PLOT85 creates accessory files based on the diffraction file name, usually by changing the extension. It determines the file number by counting back from the "dot" between the file name and extension.