Auto-export file for the data report

0 votes
15 views
asked Apr 10, 2016 by anonymous
edited Apr 11, 2016 by qandaadmin
Hi! How can I change the name of the auto-export file for the data report and add a year, month, date and hour in snippet? Like, report-201211261439.txt

1 Answer

0 votes
answered Apr 10, 2016 by Maria Molodova (8,320 points)
edited Apr 11, 2016 by qandaadmin
 
Best answer

Name of the auto-export file can be defined either in GUI (HQ panel->experiment properties) or in code snippets. I guess you would like to change the name on every experiment run, such that a new export does not overwrite the old file. If so, you can make up a name by taking a current date/time and format it to a string, for example, by placing the following code in the Start snippet:

AutoExportFile=”c:\\temp\\”+DateTime.Now.ToString(“dd-MM_HH-mm”)+”.txt”;

AutoExportFile is a proxy variable. The system variable, DateTime.Now, returns the current computer time and it gets converted to a formatted string. As result, a file, like ‘31-12_16-44.txt’ will be created. Note that you need to point on an existing folder, use double slashes and add a file extension. Also, avoid using some special symbols in the formatted string, for example ‘:’, because they are not allowed in file names. You can read more about various formats for dates and times in C# here: http://msdn.microsoft.com/en-us/library/zdtaw1bw.aspx

Welcome to EventIDE Q&A forum where you can ask questions about EventIDE software and receive answers from other members of the community

FAQ questions

Installation and License


Coding


Eye-tracking


EEG Analysis


Visual Stimuli


Runtime and Data Collection


Hardware

...