Hi:
I was searching some solution in this forum by using the search feature first place before posting here and from several attempts to achieve the result to file find certains listing of files stored in a table with no success, I ask: How do you assign the variable string from a usermade table's item to insert into file.find function instead by using "*.*" standard parameter for file find from help file?
I do try a table like this:
If you change the v variable to "*.*" dialog shows that folder with 5 files, untill here is it correct but if you do this;
I know that folder does it have 5 files, instead showing dialog that folder have 5 files it does shows as 1 file not 5. Where I am doing wrong? I am missing something?
I was searching some solution in this forum by using the search feature first place before posting here and from several attempts to achieve the result to file find certains listing of files stored in a table with no success, I ask: How do you assign the variable string from a usermade table's item to insert into file.find function instead by using "*.*" standard parameter for file find from help file?
I do try a table like this:
Code:
path = Dialog.FolderBrowse("Please select a folder:", "AutoPlay\\Docs"); tFileContents = {} tFileContents[1]= "GESTION EXISTENCIAS ALMACEN 30.09.13 modificado.xls" tFileContents[2]= "MYCESUR.png" tFileContents[3]= "office2007.psd" tFileContents[4]= "Reglamentación.pdf" tFileContents[5]= "reserva materiales.xlsx" local nFound = File.Find(path, "*.*", true, true, nil, nil); count = Table.Count(nFound); if nFind ~= -1 then if count ~= 0 then Dialog.TimedMessage("Please Wait...", "files :"..count, 2000, MB_ICONINFORMATION); end end
Code:
path = Dialog.FolderBrowse("Please select a folder:", "AutoPlay\\Docs"); tFileContents = {} tFileContents[1]= "GESTION EXISTENCIAS ALMACEN 30.09.13 modificado.xls" tFileContents[2]= "MYCESUR.png" tFileContents[3]= "office2007.psd" tFileContents[4]= "Reglamentación.pdf" tFileContents[5]= "reserva materiales.xlsx" for i,v in pairs (tFileContents) do local nFound = File.Find(path, v, true, true, nil, nil); count = Table.Count(nFound); end if nFound ~= -1 then if count ~= 0 then Dialog.TimedMessage("Please Wait...", "files :"..count, 2000, MB_ICONINFORMATION); end end
Comment