i can't load in my path

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

i can't load in my path

LucaLuca
hi,
i've  default folder in  C:\TITAN


in my code i write:

files = glob('C:/TITAN/Reports/*.txt')
%files = glob('*.txt')
for i=1:numel(files)
  [~, name] = fileparts (files{i});
  sprintf('%s = load("%s", "-ascii");', name, files{i});
 
endfor

if i read the file .txt in C:\TITAN it is all OK..

if i try to read the file .txt in C:\Titan\Reports i get the following
error:

"error: textread: could not open 'SPMIB TF V12 Intra.txt' for reading"







--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: i can't load in my path

LucaLuca
I try to use addpath('c:/titan/reports')

But it dont work



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: i can't load in my path

mmuetzel
Are you sure you didn't mis-spell the file name and that you have read
privileges for that file?

To further track down where the issue might be: Did you try renaming the
file to something simple like "a.txt"? Does it read the renamed file?



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: i can't load in my path

LucaLuca
This post was updated on .
Now it is ok

But i receive warning

Warning:fopen
 Called from textread al line...

https://gyazo.com/719474babff19b8f858f2fccc4a05600

--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html