Empirisoft Support

    Welcome to Empirisoft Support
Results 1 to 9 of 9

Thread: changing file paths

  1. #1

    changing file paths

    I am programming the experiment on my office computer, but will be running the experiment on our lab computers. Thus the path names will be different on the lab computers then on my office computer. Is there a way to globally change the path names? For example, on my office computer, the path might be "C:\Documents and Settings\Dgprocess\Desktop\Study", but on the lab computers it would be "C:\Documents and Settings\Lab\Desktop\Study." It is a large and complex study, and changing all the paths by hand would take considerable time.

  2. #2
    Join Date
    Mar 2009
    Posts
    401
    Hm. Due to the need for filepaths that are relative, a feature was added into the Experiment Editor which specifies shorter filenames for files that are found within the same directory or in subdirectories that the experiment file is located in.

    For more information, see the following link: http://www.empirisoft.com/medialab/h...file_paths.htm

    If these paths have already been created and specified - it might be a bit of work to actually go through and change them all. Around how many filenames do you believe need to be altered?

  3. #3
    Thanks newell. I actually figured this out by reading the help file (duh). However, since the program was originally written (by my former grad student) with files in lots of separate folders, I had to put all the files in one folder and am now in the process of manually changing all the paths. I don't think the experiment is written as succinctly as it could be- there are 64 different .que files that need to have path files changed (and each one has about 7 variables).

  4. #4
    By the way, I'm using v2006, which I don't think supports relative paths for subdirectories.

  5. #5
    Join Date
    Mar 2009
    Posts
    401
    Hm - If needed, I can create a small tool for you tonight to do this process for you.

  6. #6
    Wow- that would be fabulous! Its a bit tedious doing this by hand.... Do you need me to send you anything?

  7. #7
    Join Date
    Mar 2009
    Posts
    401
    Hm - that's ok. I'll have the tool ready sometime later tonight.

  8. #8
    Thanks.

    Although I'm having a related problem- I started changing the paths, and now the experiment can't find the files at all. I moved all the files into one folder, and manually changed the paths for one condition (1A)- and tried to run that condition, but for every outside file, the program gives me the error that it can't find the file. I double and triple-checked that all the paths are correct. And each individual questionnaire runs fine when run as a stand-alone questionnaire. But when I run the whole experiment, when it calls up the files within the questionnaires, it suddenly can't find the files.

    Weird.

    Thanks for your help with this.

    Oh, by the way... the ctl+alt+right arrow shortcut that's programmed to quit the experiment doesn't work on my computer... the same keys are used to change the orientation of the screen.

  9. #9
    Join Date
    Mar 2009
    Posts
    401
    Ok - let's see here...

    I've completed and attached a tool that should hopefully make your task a lot easier. Essentially, it's a 'Find & Replace' tool. It works by simply taking input for the string you want it to find, input for the string you want the found text to be replaced with, and the directory where you want files with a .que or .exp extension to be altered. The software recursively sorts through each subdirectory within the folder you denote. This means that choosing say the directory C:\ as your base folder would be a bad idea - as the software would sort through every folder on the drive, and search through any files with an extension of .exp and .que . Rather, select the folder that contains the files with text you want altered (ie. C:\MediaLab\Samples\Sample1).

    First, download and install the .Net 2.0 Framework: http://www.microsoft.com/downloads/d...displaylang=en
    Next, download the attached .Zip and run the .EXE .

    Que Files Replace:
    - Question Wording / File Name
    - Name
    - BackImage
    - BackSound
    - BackVideo
    - Parameters
    - Filename
    - OmitConditions


    Exp Files Replace:
    - File Name
    - BackImage
    - BackSound
    - BackVideo
    - Parameters


    Warning: Searching for simple text to replace may lead to replacements to occur that you did not intend to happen. For example, requesting that all instances of the word 'and' are replaced with 'C:\MediaLab\Samples\Sample1', could cause for many more replacements to take place than you may have wanted.
    Warning: The software will search through ANY folder that is contained within the Data Location. For instance, if you choose to use the folder "C:\Program Files" - it will search through EVERY folder within the Program Files directly, opening and altering any .que/.exp file it can find. Make sure you only select the specified data folder for the experiment that contains the .que/.exp files you want to edit.
    Warning: Make sure you don't have any of the files open before executing the 'Process' button.

    Here's an example of the input I've used:
    Find: find this text
    Replace: replace it with this text
    Directory: C:\MediaLab\Samples\Sample1



    The above input will replace any occurrences of the text 'find this text' with the text 'replace it with this text' in each .que and .exp file that it can find within the directory: C:\MediaLab\Samples\Sample1 .

    It should also be noted that it is -highly- suggested that you back up your files before executing this code. Please ask any questions you may have before using the software (if you have any).

    ---

    In regards to the monitor issue, see the following thread: http://www.empirisoft.com/support/showthread.php?t=389
    Attached Files Attached Files
    Last edited by Trevor Newell; 08-04-2009 at 04:51 PM.

Similar Threads

  1. Changing background color for different questionnaires
    By lisa7174 in forum MediaLab Older Versions: How Do I...
    Replies: 2
    Last Post: 10-14-2023, 01:56 AM
  2. changing the location of the open ended response box
    By greenlab in forum DirectRT Older Versions: General Questions
    Replies: 2
    Last Post: 04-21-2009, 03:57 AM
  3. Changing the pre-set instruction messages into Spanish
    By austinkr in forum MediaLab Older Versions: General Questions
    Replies: 1
    Last Post: 02-25-2008, 03:49 PM
  4. Background colour preference - changing default
    By sheavesbc in forum MediaLab Older Versions: Troubleshooting
    Replies: 2
    Last Post: 02-06-2008, 12:09 PM
  5. changing features of Participant's represented response
    By baruche in forum MediaLab Older Versions: How Do I...
    Replies: 1
    Last Post: 05-01-2006, 11:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •