# Loadvars question

**URL:** https://forum.kirupa.com/t/loadvars-question/292523
**Category:** Uncategorized
**Created:** [July 15, 2009, 8:10am UTC](https://forum.kirupa.com/t/loadvars-question/292523 "2009-07-15T08:10:59Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![NosferatuD2](https://avatars.discourse-cdn.com/v4/letter/n/74df32/32.png) [@NosferatuD2](https://forum.kirupa.com/u/NosferatuD2)
#### Post date: [July 15, 2009, 8:10am UTC](https://forum.kirupa.com/t/loadvars-question/292523/1 "2009-07-15T08:10:59Z")

</div>

Hi All,  
I have a text file that holds with key/value pairs.  
I’m using this code to read it in:

myFolderData = new LoadVars();  
myFolderData.onLoad = function() {  
photo0foldername.text = this.photo0foldername;  
imagelocation = “newclientphotos/photo/”+photo0foldername.text+"/";  
};  
myFolderData.load(“names/photo/photo0.txt”);

The text “photo0foldername.text” in the 4th line is supposed to hold the value from the text file and complete the file path - but it doesn’t work.  
Can someone tell me what I am doing wrong please.  
regards, Nos
