If you're running a script where you've defined your file name and file path as a single variable (i.e. file$ = "c:\temp\filename.dat"), make sure that the file exists in that directory, and there are no typos. Neither the name nor the path are case-sensitive.
If you're running a script where you've defined your file name and file path as two separate variables (i.e. filepath$ = "c:\temp\" and filename$ = "filename.dat"), the above could still be the issue, but another cause could be forgetting the slash at the end of the file path. If this has happened to you more than once, I suggest adding the following line to your script, after defining the file name and file path variables, but before using them:
If Right(filepath$,Len(filepath$)-(InStrRev(filepath$,"\")-1))<>"\" Then filepath$=filepath$+"\"
This checks the end of the file path for the \ character, and adds it if it doesn't find it.
Updated January 2, 2018