AnsweredAssumed Answered

Import Records Script Reference File in folder of open FMP File

Question asked by lindseym on Jun 24, 2016
Latest reply on Jun 24, 2016 by lindseym

I am wondering if there is a way to create a script that will import a CSV from the same folder where the FMP file is. The names and locations of the files don’t have a set path. We work primarily on MAC but do have some people  on PC. Here is the typical file path — but it changes.

 

Screen Shot 2016-06-24 at 12.01.04 PM.png

 

Ideally, it would be able to know to grab the CSV with the same name as the FMP, If underscores do not work well, at this point I can name it anything I want, but would ideally keep the set up as below.

 

 

L1_12345_Locations.csv

L1_12345_Locations.fmp12

 

 

 

 

 

Alternatively, I wouldn’t want to change protocol, but I could make the csv have a constant file name, but the script would still need to know to reference the folder of the current file.

 

export.csv

L1_12345_Locations.fmp

 

Here is as far as I got... can I do calculations in the File Path List?

 

Screen Shot 2016-06-24 at 1.39.27 PM.png

 

And the error I get:

 

Screen Shot 2016-06-24 at 1.41.36 PM.png

Outcomes