This article applies to:
This item was introduced in E-Prime 2.0 (220.127.116.11).
E-Prime permits customization of the data file name.
The default data file name follows the [Experiment]-[Subject]-[Session]structure, but can be changed to accomodate any paradigm or lab scenarios. The use of any [attrib]value known at the time the data file is open can be used. This typically means those found in the Startup prompts at the start of the experiment or those entered as part of a .startupInfo file.
NOTE: In E-Prime 2.0, this feature is available for Professional users only.
2/17/2012 10:10:00 PM
|A promising feature. Can we use this to direct data files to a custom folder? E.g., will "Data/[Experiment]-[Session]-MyLab" direct data files to the Data subfolder in the experiment's folder? Or, will "../Data/[Experiment]-[Session]-MyLab" direct data files to the Data subfolder in the parent folder of the experiment's folder? Thanks.|
-- David McFarlane, Professional Faultfinder
2/29/2012 8:01:00 PM
|The intent of this feature is for naming of the data file and the result here will update the DataFile.BaseName attribute in experiment and edat2.|
If wanting to dump the edat2 somewehere else, then consider any of these alternatives...
1) INFO: Ability to specify location path for data file with E-DataPath environment variable 
2) Associate an attribute DataFile.Filename.Override in .startupInfo or via a Package file (InitGlobals)
11/9/2012 6:48:00 PM
|I just tested this, and to my delight, it *does* work to redirect data files to custom folders exactly as I asked earlier, with the stipulation that the custom folder *must* already exist or you get a runtime error when starting the run.|
1/25/2013 7:24:00 PM
For some reason I don't see this feature in the GUI of my e-prime version 2 professional.. I'm looking in 'Experiment' > 'Data File' tab > and under the 'log level names' tree I see nothing, not the box shown here, where you can customize the filename.
The experiment I 'inherited' from another researcher has code written to do basically what this box does:
c.DataFile.Filename = c.GetAttrib("Experiment") & c.GetAttrib("Protocol") & "-" & c.GetAttrib("Subject") & "-" & c.GetAttrib("Session") & ".txt"
However, the problem is that using this code ONLY will allow e-prime to overwrite a datafile without warning, if for instance that "subject" number has already been used and someone mistakenly types that number.
Anybody know of some code that I can include in the script that will warn users that "another datafile contains this 'subject' number" before overwriting?
Thanks in advance,
1/25/2013 7:28:00 PM
|If the Experiment Object in Structure view does not have (PROFESSIONAL) after it, then the es2 file is Standard and would need to be converted to Pro (do a save as).|
Note that once converted, E-Prime 2.0 Standard will not be able to view the file.