Your filepath is the full file path, not the directory. You are then adding 'data.txt'
to that, you need to change your code to:
filepath = 'C:\\Users\\Josh\\Documents\\Programming\\'
infile = filepath + 'data.txt'
infile = open(infile,"r")
In python '\' is used for escaping characters so to have an actual '\' you must use '\\'.
Alternatively you can (and generally should) use os.path.join
to join together directories and files. In that case your code becomes:
from os.path import join
filepath = 'C:\\Users\\Josh\\Documents\\Programming'
infile = join(filepath, 'data.txt')
infile = open(infile,"r")