Error with DIRLIST
Posted: August 7th, 2026, 3:10 am
Hello friends,
I need your helps with DIRLIST FUNCTION. When I use DirList function on PC/Laptop, It's working, but when I use DirList function on Mobile Android it doesn't work.
That's is my code:
function ListarAudio()
List string displayList;
List string fileList;
string audioFolderPath = "../Audio"; // adapta según ruta real
numeric success;
success = dirlist(fileList, audioFolderPath, filter:="*.m4a", recursive:=true); //this code line doesn't work on mobile
//success = dirlist(fileList, audioFolderPath, filter:="*.*", recursive:=false); ---This code line works correct, but I need brought only *.m4a (audio files)
if fileList.length() = 0 then
errmsg("No se encontraron archivos de audio en " + audioFolderPath);
endif;
// Mostrar los archivos
numeric selIndex = fileList.show("Seleccione un archivo de audio");
if selIndex > 0 then
string selectedFile = fileList(selIndex);
// Aquí haces lo que necesites: reproducir, revisar, borrar, etc.
Audio aud;
aud.load(selectedFile);
aud.play();
endif;
end;
Attached:
View of audio files in my root of mobile
View of CsEntry in my mobile
I need your helps with DIRLIST FUNCTION. When I use DirList function on PC/Laptop, It's working, but when I use DirList function on Mobile Android it doesn't work.
That's is my code:
function ListarAudio()
List string displayList;
List string fileList;
string audioFolderPath = "../Audio"; // adapta según ruta real
numeric success;
success = dirlist(fileList, audioFolderPath, filter:="*.m4a", recursive:=true); //this code line doesn't work on mobile
//success = dirlist(fileList, audioFolderPath, filter:="*.*", recursive:=false); ---This code line works correct, but I need brought only *.m4a (audio files)
if fileList.length() = 0 then
errmsg("No se encontraron archivos de audio en " + audioFolderPath);
endif;
// Mostrar los archivos
numeric selIndex = fileList.show("Seleccione un archivo de audio");
if selIndex > 0 then
string selectedFile = fileList(selIndex);
// Aquí haces lo que necesites: reproducir, revisar, borrar, etc.
Audio aud;
aud.load(selectedFile);
aud.play();
endif;
end;
Attached:
View of audio files in my root of mobile
View of CsEntry in my mobile