This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Goof's profile picture

fs.move(blah,blah2) "Unsupported mode"

Started by Goof, 14 December 2013 - 05:05 AM
Goof #1
Posted 14 December 2013 - 06:05 AM
Hello.
I'm in some kinda trouble with a backup function i just made…


local files={"test.cfg","test.reg"}
local place="testbackup/"
local main=".test/"
if fs.isDir(place) then fs.delete(place) end
fs.makeDir(place)
for k,v in pairs(files) do
	print(main..v)
	fs.move(main..v,place..v)
end


this wierd line – ( the line with fs.move )
makes something really wierd..
When the program runs that function it returns:
backup:8: Unsupported mode

And i don't know why?

EDIT:
A Note:
the print(main..v) returns ".test/test.cfg"

Please help


Thanks in Advance
Edited on 14 December 2013 - 05:07 AM
MKlegoman357 #2
Posted 14 December 2013 - 07:11 AM
Your code is fine. I even tested it - it works. Maybe you where using fs.open instead of fs.move?
Goof #3
Posted 14 December 2013 - 07:53 AM
Oh.. Okay, but i still used fs.move.
And i also solved this:

I forgot to stop overwriting the fs.move function ( Hehe Im working on AdvLock :P/> )
I was adding some security to the program, and it seems like everything works smooth now

Thanks!
:D/>