PDA

View Full Version : read File / Fullpath



papou
06-27-2012, 09:11 PM
I'm tired, i can't understand... Why this is return me an error?



SaveScene();
Scene = Scene();
Scenename =Scene.name;
sourcename = fullpath(Scene.name);

f = File(sourcename,"r+") || error("Cannot open file");
...

(... I got "the Cannot Open File" here ...)

Fullpath is not returning the full path of the file?

xchrisx
06-27-2012, 09:32 PM
for the full filename:

sourcename = Scene().filename;

and i dont know if r+ works never tried it,

f = File(sourcename,"r") || error("Cannot open file");

does that work for you?

papou
06-28-2012, 04:22 AM
Yess thanks!
I don't know why this time i have choice Fullpath.... (i have several other script that use Scene().filename ...)
Thanks again!