Edit and add to librarypath programatically

9 visualizaciones (últimos 30 días)
Jason
Jason el 24 de Sept. de 2015
Respondida: Walter Roberson el 24 de Sept. de 2015
Is it possible to do the following programatically?
In Matlab, type
>> edit librarypath.txt and add the line:
C:/Program Files/Micro-Manager-1.4
Thanks Jason

Respuestas (1)

Walter Roberson
Walter Roberson el 24 de Sept. de 2015
lpfile = fullfile(prefdir, 'librarypath.txt');
[fid, message] = fopen(lpfile, 'at');
if fid < 0;
error('Could not open file because: %s', message);
end
fseek(fid, 0, 'eof');
fprintf(fid, '%s\n', 'C:/Program Files/Micro-Manager-1.4');
fclose(fid)

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by