Os.move(Src,dest) Not Working ?

Hejo,

get an error when trying to use os.move(src,dest) function:

lua:434: attempt to index field ‘os’ (a nil value)

OS: Win7 64, Renoise 2.8 64 Beta 6

Any ideas ?

I don’t see it mentioned explicitly in the lua.standard.api lua documentation.
AFAIK only a few file functions are supported, the rest has been left out as a security measure. but perhaps it is io.move() instead of os.move?
Do note that all IO functions use UTF 8 encoding.

Thanks for the hint :)
I tried io.move and os.rename / io.rename but nothing worked, so far.

The Renoise Docs say:

– Moves a file or a directory from path ‘src’ to ‘dest’. Unlike ‘os.rename’
– this also supports moving a file from one file system to another one. Returns
– true if the operation was successful; in case of error, it returns nil plus
– an error string.
os.move(src, dest) → [boolean, error_string or nil]

Is this maybe just supported for MacOS / Linux ?

os.move is available on all platforms.

Do you maybe have overwritten the global “os” table with a local variable called os in your code?

what does ```

= os.move("", “”)

  
in Renoises terminal say?

Thanks taktik, it says true
now it works as expected, I don’t know what’s different but somehow it just works. Maybe it was a typo or something, though I checked it several times.
Sorry for the confusion

Had you tried closing and restarting Renoise with it not working throughout?

I’ve had weird behaviour in the TestPad part on the LUA Editor in the past. In that after using it for some time and trying things, lots of oprinting and running snippets, suddenly such simple commands as a basic print or oprint will do nothing at all until I close and restart Renoise.

Never reported as I’ve never found a way to reliably recreate it and although being a bit of a pain it doesn’t cause a crash.

Thanks for the hint. I’ve thought about something similar, too. But I also can’t reproduce it.
If it ever should occure, I will report more

I experience this problem today and i can’t get it to move folders.
doesn’t matter if i restart Renoise or not.
The result is returned as “true”, yet nothing happened.
Sorry, made a typo here as well :P