[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Moving files from a directory to another
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 30 Sep 2015 22:32:40 -0300
> What's the Lua function to move a file from one directory to another?
os.rename should do that, but note that you need to supply the name
in both cases, that is, things like this do not work:
os.rename("./foo.txt", "/tmp")
You need to do
os.rename("./foo.txt", "/tmp/foo.txt")
See man rename.