list = fs.list("programs")
nfiles = #list
term.setCursorPos(1, 3)
for _,file in ipairs(list) do
print(file)
end
or give me a variable for every file and then print it?
Thanks
Posted 11 October 2012 - 02:36 AM
Posted 11 October 2012 - 02:39 AM
local list = {} -- declare as table
list = fs.list("programs")
for x=1, #list do
print(list[x])
end
Edited by luanub, 11 October 2012 - 02:40 AM.
Posted 11 October 2012 - 02:59 AM
Posted 11 October 2012 - 03:09 AM
_G[<string>]will get the variable of the strings name
Posted 11 October 2012 - 02:45 PM
0 members, 1 guests, 0 anonymous users