Using various IO functions, I'd like to access a file stored on a network drive.
Currently, I have a file called (for instance) sw.txt in the default folder MC accesses for logs and so on. This works well, but is only local.
using something like;
***script lines***
for line in io.lines ("sw.txt") do
print (line)
***more script lines***
The file(s) in question may be stored on a server called "aardsp" in a folder called "texthelps", so the path is \\aardsp\texthelps\sw.txt. I've tried a number of combinations but I can't get the IO function to get the file from anywhere other than the local file, ideas very much appreciated.
Sure mapping the drive will help, but I still can't explicitly direct mush to consistently grab a file from any directory other than that currently the default.. even somewhere on local c:\...somewhere.
I should have been clearer in the original question...
using io function (first line only here);
for line in io.lines ("C:\\text\\sw.txt") do
gives this error;
[string "Alias: "]:1: bad argument #1 to 'lines' (C: extsw.txt: Invalid argument)
stack traceback:
[C]: in function 'lines'
[string "Alias: "]:1: in main chunk
I'm missing something obvious I'm sure, appreciate your help again.