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

fs.move , file exists

Started by modernzink, 29 February 2012 - 06:28 PM
modernzink #1
Posted 29 February 2012 - 07:28 PM
i want to use fs.move in a installer programm, so first it build data.txt and then he should move it in a directory.

fs.makeDir("pervar")

file = io.open("bucketcoord.txt", "w")
file:write([[
9,105,-95
]])
file:close()

fs.move("bucketcoord.txt","pervar")

He says me that the file exists, but it must exist to be moved.
I don't find the mistake.
Liraal #2
Posted 29 February 2012 - 07:31 PM
fs.move("bucketcoord.txt","pervar/bucketcoord.txt")
try this
modernzink #3
Posted 29 February 2012 - 07:40 PM
fs.move("bucketcoord.txt","pervar/bucketcoord.txt")

It works, thanks.