Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

How to change where results files are created/saved

How do I change where results files are created? I want to keep the OpenSesame program on my desktop, and I want the results to be saved in a folder on my desktop. What is one way to do this?


Thank you.

Comments

  • One option would be this inline_script at the end of your experiment:

    import shutil,os,datetime
    
    backup_path = os.path.join(var.experiment_path,"Logfile")
    if not os.path.isdir(backup_path):
       os.makedirs(backup_path)
    
    now = datetime.datetime.now()
    current_time = now.strftime("%Y-%m-%d__%H-%M")
    
    filename = "ID"+str(var.subject_nr)+"_Date-"+current_time
    
    shutil.copyfile(var.logfile,os.path.join(var.experiment_path,"Logfile",filename+".csv"))
    


    It creates a file named 'Logfile' that includes all your logfiles. You may also change the path to any place you'd like.

    However, one data file will still stay on your desktop. With the script you may overwrite it for every participant, because you get the backup.

    Another and much cleaner option is to use the GUI.


    Cheers,

    Stephan

Sign In or Register to comment.