Is there any way I can specify the output location for my data file
from EPrime 2.0 to be somewhere other than the folder where the
experiment file is loacted? From searching this list I realize that I
can't change the file name that is output but can't find any reference
to location.
Thanks
Liza
I am not around e-prime right now. But... according to PST-site
changing the name and location of the .edat file should be a feature
of 2.0. Can't find how to do it though. My guess would be that you
need to change something in the menu under the purple e-prime logo at
the top of your 'experiment tree'.
Did you check things there?
Best,
liw
c.DataFile.Filename = CStr(c.GetAttrib("Experiment")) & "-" & CStr
(c.GetAttrib("Subject")) &_
"-" & CStr(c.GetAttrib("Session")) & "_" & Format(Date,"ddmmyy") & "_"
& Format(c.GetAttrib("SessionTime"),"hhnn") & ".txt"
then once you've created the package you have to add it to your
experiment..
1. go in eprime 2.0 --> tools, options, tab: packages (this contains
the path to the folder your package should be in, you can also add a
folder)
2. start your exp, go in the structure view to Experiment <blabla>
(int the top)
3. click on "packages" and add your package
4. now your files are written with date + time
This explanation will self destruct in 5 seconds...
4 seconds...
...
3 seconds... (why are you still reading this.. get to a safe distance)
2. seconds...
1.... secoooooond..
[you have too much time if you're actually still reading this, you
should be creating your package..]
Bye, Rinus
> > Liza- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -
This email was independently scanned for viruses by McAfee anti-virus software and none were found
The matter doesn't quite let me go... Do ask PST about it. I will
guess that they will answer that this will be possible trough a new
graphical interface that is yet (still) to be implemented and will
allow users to modify external startup info properties (aka the
startup info manager). I found mentions of this nifty device as way
back as 2007.
Some of the 'infrastructure' for this manager is allready in place
though. In the end of any 2.0 script you should be able to find these
lines:
************
' Set the Filenames for the data files
Dim strFilenameRecovery As String
Dim strFilenameEDAT As String
'If the attribute DataFile.Filename.Override exists
' then use it for the .txt and .edat filenames
If c.AttribExists("DataFile.Filename.Override") Then
' Set the default Data Filename
strFilenameRecovery = CStr(c.GetAttrib
("DataFile.Filename.Override")) & ".txt"
strFilenameEDAT = CStr(c.GetAttrib("DataFile.Filename.Override")) &
".edat"
Else
' Set the default Data Filename
strFilenameRecovery = CStr(c.GetAttrib("Experiment")) & "-" & CStr
(c.GetAttrib("Subject")) & "-" & CStr(c.GetAttrib("Session")) & ".txt"
strFilenameEDAT = CStr(c.GetAttrib("Experiment")) & "-" & CStr
(c.GetAttrib("Subject")) & "-" & CStr(c.GetAttrib("Session")) &
".edat"
End If
*************
Now the solution seems simple: create an attribute attribute
DataFile.Filename.Override et presto, the script will use that value
for your edat filenames. Setting it DataFile.Filename.Override to
foldername/restofthename should do the rest... but... the tricky
thing is.... I can absolutely not find a way to create or declare
DataFile.Filename.Override. I tried it in the startup-info, in inlines
on the main proc and on subprocs, set it as an attribute in a list and
tried to user-declare it... nothing. E-prime sees datafile as a
function, doesn't like the dots in it etc etc .
Maybe one of the more code knowledgeable people around here can come
up with an idea??
That all said....
Why do you need to change the foldername of the edat file? What I
usually do is place my estudio in the folder where I want to collect
my edat files, create the e-run file and then create a shortcut to the
erun-file and move this to a separate 'startmyexperiment'-folder.
Wouldn't that work just as well for you Liza?
Best,
Anne-Wil
Fortunately it is really quite simple to store your stimuli in a
different folder! (once you know how).
Create a new folder within the folder that holds your e-studio file
and call it (for instance) stimuli.
Now.... it is most likely the case that you have imageobjects that
refer to an attribute in a list to retrieve a filename... right? And
in the imageobject properties this looks as follows: filename:
[stimname] . Replace [stimname] by filename: stimuli\[stimname] and
you're set. Alternatively you could insert the string stimuli\ into
all your lists but that's far more work and unneeded.
Presto and enjoy!
Anne-Wil
Also: stimuli\ works for me, but I think I remember instances where
stimuli/ was used, so fiddle around with that if it doesn't work.
'Assign the new filename
ImageDisplay3.Filename = stimuli\strImageFile
?
^ that works for me!
Please let me hear tomorrow that it also worked for you ;)
Have a nice evening!
liw
p.s. thanks for the compliment!
> ...
>
> read more »
'Retrieve the filename from the Context
Dim strImageFile As String
strImageFile = "stimuli/"&c.GetAttrib("target")
'Assign the new filename
ImageDisplay3.Filename = strImageFile
'Instruct the object to load the image
' contents into its internal structures
ImageDisplay3.Load
basically the same thing but on a different location on the script ;)
Just to ahead any next buts :p As for the students pulling data
thing... I would just copy the datafolder as often as there are
students ;)
And now I really go.
> ...
>
> read more »
There is also an explanation in the PST Knowledge Base, but that
explanation is inaccurate. However, PST did get it right in the
Reference Guide on p. 62.
Liza, glad you got the stimulus files squared away (thanks to liw's
great help!). As for keeping each student's data files separate, how
about just assigning each student a Session number to use for their
runs? Unfortunately, I cannot think of any easy way to sort or
select data files based on the Session number, but then if you really
dare you could subvert the Subject number to use as a student number,
and use the Session number for the subject or whatever. Then it gets
easy to sort & separate each student's data files. But you already
thought of that.
-- David McFarlane, Professional Faultfinder
As discussed below, the StartupInfo file facility promises the answer
for EP2. This was announced at least as far back as Oct 2007 (see
http://support.pstnet.com/forum/Topic609-6-1.aspx ), but no details
have been forthcoming since then. I myself have a Web Support
request about this very issue going back to Dec 2008, at which time
Matt said that the StartupInfo file would "be available in an
upcoming build" when a public editor became available (a "public
editor"!? why not just use a plain old text file that we can view
and edit as we like??), and that he would notify me when this
happened. Over a year later, and I have not seen any such
notice. Perhaps it's time for me to update my support request.
Once again PST shows its prediliction for breaking things that
already work, and promising new things that they cannot
deliver. IOW, PST has become the Microsoft of behavioral research.
-- David McFarlane, Professional Faultfinder
From Cindy Carper on 1/21/2010 1:18:00 PM
Liza,
It is possible to change the location of where the EDAT2 files are saved so that they can be saved to a folder other than the one where the ES2 file and stimulus files are saved. The DataFile object within E-Prime generates a .txt file, known as the E-Recovery text file, during the running of an experiment. At the end of the experiment, this file is converted into an EDAT file for use within E-DataAid and E-Merge.
By default, these files are written to the same folder/directory as the experiment EBS file that is running. E-Prime 1.1 (and later) introduces the ability to redirect the default location for the E-Data files to be written.
Upon opening of the data file, E-Prime will look at the system E-DataPath environment variable. If it is specified, all EDAT files will be written to this location during the running of experiments. This setting overrides the default. All data files will be written to this location regardless of what folder they are run from. To restore to the default setting of writing the data file contents in the same directory as the running experiment EBS file, simply delete or clear the value of the E-DataPath environment variable.
How to specify the E-DataPath environment variable in Windows XP/Vista
Select the System applet from Control Panel.
Select the Advanced tab property page.
Click the "Environment Variables" button.
Create a E-DataPath environment variable and specify the drive letter and directory of the location where the data files should be written.
If E-DataPath is created under the user section, only experiments run while logged in as the current user will be affected.
If E-DataPath is created under the system section, all experiments run will be affected.
Consult with your Network Administrator upon choosing the system variable option.
Click OK to close and save.
This incoming email to UWE has been independently scanned for viruses by McAfee anti-virus software and none were detected
Because nobody so far as I know has found that capability of any
use. Think about it. The E-DataPath environment variable sends
*all* your data from *all* your studies to the same directory. This
is useful only in those cases where someone wants to gather all the
data from all their studies into one master directory -- say, if you
run the same study from several networked machines, but want all the
data gathered into one networked directory for easier merging (but
for critical timing you should never run E-Prime on a networked
machine anyway, so much for that use).
But this is almost the *opposite* of what you want for your use. Of
course, with some clever use of batch files or AutoIt script you
might manage to set a different E-DataPath environment variable for
different runs, good luck with that. So far I have not found anyone
who has had any use for the E-DataPath environment variable, so I
will be very interested to learn what you make of it.
-- David McFarlane, Professional Faultfinder
"For a successful technology, reality must take precedence over
public relations, for nature cannot be fooled." (Richard Feynman,
Nobel prize-winning physicist)
OK, I did some legwork and at long last got the following response
from Matt at PST:
"The public build that includes the StartupInfo Editor (2.0.8.73) was
just released in December. Anyone can get it via the Download section
on the support site or via
http://www.pstnet.com/e-prime/support/getep2.asp. Note that this is
available in E-Prime 2.0 Professional only.
"The StartupInfo Editor functionality is documented in the New
Features Guide, available through the E-Prime 2.0 folder on the
Windows Start menu.
"Basically, the StartupInfo Editor is an easy way to edit
*.startupinfo files, which are XML-based. You don't have to use the
editor, however, and the *.startupinfo files can be edited through
Notepad or some other text editor. You can also make changes to the
files through E-Prime (e.g., to increment a subject number for the
next run, etc). The syntax for doing this is provided in the New
Features Guide."
I responded to Matt (with slight revisions) as follows:
Thanks. To be fair to you folks, I see now that Brandon posted this
in a pinned topic on the Forum, and I had read that post but forgot
about it. OTOH the threads discussing this issue were left hanging,
and that is what set me off here. Now here are some questions.
- Very glad to hear that we can in principle make a StartupInfo file
with any text editor. So, do I need to install EP2.0.8.73 just to
read the documentation, or is there some other way for me to get the
documentation so I can get started exploring StartupInfo files? I
have downloaded 2.0.8.73, but unfortunately I am not at liberty to
upgrade from 2.0.8.22 just yet, and it seems silly to need to upgrade
just to read some documentation. Surely you can do better that
that. Perhaps you could attach a version of the latest "New Features Guide".
- Once we have made a proper StartupInfo file (using any appropriate
editor) will it work in earlier versions of EP2 (e.g., 2.0.8.22), or
non-Pro editions, or even EP1 versions that generate script referring
to the StartupInfo file (you can bet I will test this out myself at
some point, but I would prefer some advanced hints from you)?
- That's all very nice that PST supplies documentation of new
features in, well, the "New Features Guide". But I read the "New
Features Guide" when we first got EP2 and saw it as just another
marketing brochure to highlight features new to EP2 from EP1, so I
would never think to look at it again for technical documentation of
features added in updates within EP2. What you need is a simple
"What's New" text file with a complete revision history that geeks
like me would actually look at.
- Looking beyond the StartupInfo file to broader issues, how can we
get automated notices of E-Prime developments? Sure, the PST
Newsletter is a good start, but that does not come out often enough
(only quarterly) and is more a marketing tool that an instrument for
useful technical updates. E.g., I would like a notice whenever a new
article gets added to the KB so that I can keep up to date. And
please do not suggest using RSS, I have tried RSS and found it useless.
-- David McFarlane, Professional Faultfinder
-- David McFarlane, Professional Faultfinder
OK, now that I have looked at the documentation, I can say that the
StartupInfo file absolutely addresses your original question, i.e.,
it provides a fine mechanism for managing the data file name and path
in any way you like, and many more things besides. Your programs can
even modify the StartupInfo file with your own script. Think of the
possibilities! Every once in a while PST gets something right, and
this looks like one of those times. It's just too bad that they are
so stingy in releasing the information.
However, you have only EP2 "base" rather than Pro. You need Pro if
you want to use the StartupInfo Editor. OTOH, if you understand the
format then you can edit the StartupInfo file with any text editor
(which may well offer some advantages over PST's clumsy StartupInfo
Editor). Then again, I do not yet know whether non-Pro installations
can use StartupInfo files even if they cannot edit them, nor do I
have any solid information on what version numbers can use
StartupInfo files. Matt Lenhart at PST tells me, "the *.startupinfo
files should work in any version of E-Prime 2.0 that supports them
(2.0.8.11 or later)". However, my own tests with EP2.0.8.22 Pro
failed -- I have asked Matt to send me a full working demo (or even
better, to post one for us all up on the PST web site), we will see
where that goes. Note also that, although EP1.2 generates script
that hints at the ability to use StartupInfo files, "Support for
*.startupinfo files is not included in E-Prime 1.x."
<editorial>
That said, I cannot imagine why Cindy Carper set you on the wrong
path to using the E-DataPath environment variable instead of guiding
you to the StartupInfo file, which actually addresses your
question. She should know better.
</editorial>
-- David McFarlane, Professional Faultfinder
<?xml version='1.0' encoding='utf-8' standalone='yes'?>
<StartupInfo>
<StartupInfoItem itemName='SubjectNum'>246</StartupInfoItem>
<StartupInfoItem itemName='SubjectSess'>1</StartupInfoItem>
</StartupInfo>
OK, right above this line you should see a blank line, preceeded by
five lines of code, otherwise your reader blocked something. In that
case, just go to Jacquie's post on the PST Forum and download her .txt file.
Anyway, that's what a StartupInfo file looks like. Just a text file,
if you have an experiment named foo.es2, then just put that text into
a file named foo.startupinfo in the experiment directory and see what happens.
-- David McFarlane, Professional Faultfinder
(BTW, the "New Features Guide" that went out with EP2.0.8.73 has the
wrong figure for section 1.6.2.1 about the StartupInfo Editor. Matt at
PST kindly sent me his original (and correct) version of that section,
and I posted that at http://www.pstnet.com/forum/Topic4015-6-1.aspx for
everyone.)
But now the good news -- I totally cracked this longstanding problem!
(Or did I just fail to do a proper search of the archive?). It's not
even that hard, and we had the clues all along in the code that E-Studio
generates for the Main() routine. I will post my solution in a separate
thread with a title like "How to use a custom data file or path name."
-- David McFarlane, Professional Faultfinder
You can do this by taking control of the Context.Datafile object, which
you may learn about in the online E-Basic Help or from the code that
E-Studio generates for the Main() routine. You would then add the
appropriate inline code as the first thing in your SessionProc. Here is
an example script that you may build on. For the sake of this example
we ask the experimenter for their initials (and then add that to the
file name), though in practice we would more likely make this a
StartupInfo parameter.
' Close data file already started in the Main() routine.
If CLng(c.GetAttrib("Subject")) <> 0 Then
c.DataFile.Close
Kill c.DataFile.FileName ' might as well also delete it
End If
' Construct new file or path name any way you like. You may want to
' add code to deal with potential problems such as existing (duplicate)
' or illegal file names and non-existent directories.
Dim exptrID as String
exptrID = AskBox( "Enter experimenter initials:" )
c.DataFile.Filename = c.GetAttrib("Experiment") & "-" & exptrID & "-" _
& c.GetAttrib("Subject") & "-" & c.GetAttrib("Session") & ".txt"
' Start new data file.
If CLng(c.GetAttrib("Subject")) <> 0 Then
c.DataFile.Open
c.LogHeader
End If
Note that this method uses ordinary features of E-Prime and should work
with every version going back to 1.0.
A couple of warnings: First, if you use this to change the data path,
pay attention to the use of forward slashes ("/") vs. backslashes ("\")
as path separators in E-Prime strings, as discussed at
http://support.pstnet.com/forum/Topic2336-12-1.aspx and elsewhere.
Second, without care you could easily lose data doing this, so do not do
this unless you know what you are doing and can enforce the proper
safeguards.
-- David McFarlane, E-Prime Master & Professional Faultfinder
Many Thanks
Liza
> > stingy in releasing the information.- Hide quoted text -
>
> - Show quoted text -