Your version would only have been getting the file without its directory. When you use the single output version of uigetfile, uigetfile doesnot output the fully-qualified name.
Using fgetl() on a file reads a line from the file. It is possible that there is no need to process the line further, such as if it is a header line or comment: in such a case you still need to read the line in order to be in position to read the data that you do want.
Note that there is no way in MS Windows, OS-X or Linux to say that you want to position to a particularline number of a file -- no way except to start a the beginning and read line by line until you reach the one you want.
Best Answer