var filePair = filePath -"/SPI/CH_SPI_Analysis/"
should probably be
var filePair = filePath + "/SPI/CH_SPI_Analysis/"
The location of my active document is at ".../Images/SPI/CH_SPI_Analysis/" I'm trying to retrieve a file from ".../Images/PV/CH_PV_Analysis/".
I assumed that because adding "+" and then "/PV/" would add direct me to ".../Images/SPI/CH_SPI_Analysis/PV/" then writing "-" and then "/CH_SPI_Analysis/" I would direct myself up a level in my file structure... this is completely wrong isn't it...
this is completely wrong isn't it...
Yes. - is strictly used for numerical operations and will try to convert the operands to numbers before doing subtraction. + is overloaded for numerical ops and string concatenation.
To move up a level, you would use File.parent.
Knowledge! What would that look like in practice?