As YT said, fixing the problem may be a more efficient use of your time than trying to work around it. Assuming you have enough local disk space, creating a synced copy of the network folder (offline files in Windows, some other name in other OSes) may allow you to avoid having problem with disconnections.
Otherwise, yes, you can work around it. It's going to be a pain, particularly with the way matlab IO is designed. First, you won't get an actual error when you try to open a file that is unavailable. You just get an invalid file ID. It's only when you try to use that invalid file ID (e.g. in a fread call) that you get an error. And of course, since the connection can drop at any time, any read or write operation can fail while previous ones succeeded.
So, to limit the chance of failure and the number of locations where you have to deal with them, I recommend you make your IO code as simple as possible. Don't process anything. Wait until you've read everything you need. Then I would wrap that file IO code inside a try ... catch statement. If an error is caught during IO, simply retry the whole IO from the beginning.:
filetoopen = '\somewhere\somefile';
fid = fopen(filetoopen);
fileheader = fread(fid, [1, 4], '*uint8');
fseek(fid, 8, 'cof');
filedata = fread(fid, [1, Inf], '*char');
if fid > -1
try, fclose(fid); end
warning('failed to read "%s". Retrying', filetoopen);