Code to open a directory/folder.

Posted by Wuggly on Sat 23 Apr 2016 12:24 PM — 5 posts, 21,748 views.

USA #0
Hello again!

I was wondering if there is a way in Lua to open a directory/folder? Particularly the Logs folder.

I've been reading around io and os, but can't seem to figure it out.

http://www.gammon.com.au/scripts/doc.php?general=lua_io
http://www.gammon.com.au/scripts/doc.php?general=lua_os

I'm thinking there might be a way using os.execute?

This may also be a nice little feature to add into MUSHclient itself in the Log Session.. box, like an Open Logs Folder button, or Open directory.
USA Global Moderator #1
What do you mean by "open"?
USA #2
Like open up the actual folder, outside of MUSHclient.
Australia Forum Administrator #3
Something like this?


os.execute ("explorer " .. GetInfo (58) )
USA #4
Yes! Exactly what I was looking to do. Thank you Nick!