0 votes
555 views
by
edited by
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
by (8.7k points)
edited by
 
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

Categories

FAQ questions

Installation and License


Coding


Eye-tracking


EEG Analysis


Visual Stimuli


Runtime and Data Collection


Hardware

...