Prev Previous Post   Next Post Next
Old 09-01-2015, 07:06 AM   #1
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
Default io.popen - is it working with Lua?

Hi.
I need to store table of all files in folder, for example /Reaper/Grooves.
Cant get this works. Can anyone help?

Code:
files_t = {}
path = reaper.GetExePath().."\\Grooves" .."\\"
for file in io.popen(path):lines() do     
  table.insert(files_t, file)
end
Error: "attempt to index a nil value"

I also tried this (don`t understand synthax, here could be something wrong), same error:
Code:
io.popen([[dir "]]..path..[[" /b]]):lines()
ps: is this forum с++ only, or developer forum also means scripters place ( ReaScript: API: Wish List thread, first questions of The "how do I?" REAPER plug-in extension thread)?

Last edited by mpl; 09-01-2015 at 08:56 AM.
mpl is offline   Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:34 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.