List files in a directory

 
Hi all,
I am learning MQL4, and I am currently trying to master FileIO. I can read, write, delete, etc.. but I have run into a slight wall. I would like to list all files in a folder based on a filter, ie ListFiles("*.csv") I cannot find any way in the scripting documentation to do this. Is there an easy way to get a listing of files in a specific folder?

Thanks in advance
Lance
 

Hi LanceWynn,

How can I delete a file outside de MetaTrader directory using MQL?

Thanks

 

You'll have to make a call to a windows DLL to do that.

 
phy:

You'll have to make a call to a windows DLL to do that.


Hi Phy,

Do you have an example?

I am trying for all day long something like:

ShellExecuteA(0,"Open","erase","\""+File1+"\"","",1);

ShellExecuteA(0,"Open"," del ","\""+File1+"\"","",1);

Thanks in advance,




Reason: