I run a script, myfile.m, which contains the following code:
FullPathTempDir = tempname; [temp_dir temp_file] = fileparts(FullPathTempDir); mkdir(FullPathTempDir); destinationFile = [temp_file,'.m']; origPath = addpath(FullPathTempDir); copyfile('hSampleDisp.m',fullfile(FullPathTempDir,destinationFile)); type(temp_file);
I receive the following error :
??? Error using ==> type tp103239 is a directory. Error in ==> myfile at 7 type(temp_file);
Best Answer