lua-users home
lua-l archive

Re: Moving files from a directory to another

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> 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.

AltStyle によって変換されたページ (->オリジナル) /