# \[SOLVED\] CSV Reader is getting older data instead of new selected file data

**URL:** <https://forum.inductiveautomation.com/t/solved-csv-reader-is-getting-older-data-instead-of-new-selected-file-data/39429>\
**Category:** Ignition\
**Created:** [October 6, 2020, 4:43pm UTC](https://forum.inductiveautomation.com/t/solved-csv-reader-is-getting-older-data-instead-of-new-selected-file-data/39429 "2020-10-06T16:43:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmeyers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmeyers/32/37453_2.png) [@bmeyers](https://forum.inductiveautomation.com/u/bmeyers)\
**Post date:** [October 6, 2020, 4:43pm UTC](https://forum.inductiveautomation.com/t/solved-csv-reader-is-getting-older-data-instead-of-new-selected-file-data/39429/1 "2020-10-06T16:43:15Z")

</div>

Good morning,  
I have the following script running.

```
import glob
import csv
path = system.file.openFile("csv")
if path != None:
    for fname in glob.glob(path):
	    system.gui.messageBox(str(fname))
	    f = open(fname)   

	    csv_RosterData = csv.reader(f)
	    csv_RosterData = list(csv_RosterData)
	
    f.close()
	
    #Return CSV data.
    system.gui.messageBox(str(csv_RosterData))

```

I have two files.

```
roster.CSV
Tuesday.CSV

```

When I run the script selecting Tuesday.CSV I get roster.CSV data showing up. Even when I delete roster.CSV and select Tuesday.CSV I still get roster.CSV data. Is Ignition holding onto the data in memory somewhere? I’m not sure how to overcome this particular problem…

EDIT: In my infinite wisdom I put a CSV file called Tuesday.CSV in another location with the data of roster.CSV. I was picking the wrong file path all along.
