Download MetaTrader 5
To add comments, please log in or register
Download MetaTrader 5 and start trading today!
eugenio
57
eugenio 2014.03.19 09:22 

With this example code...

   long search_handle=FileFindFirst("*",file_name);
   if(search_handle!=INVALID_HANDLE)
   {
      do
      {
         Print("file_name = ", file_name);
      }
      while( FileFindNext(search_handle,file_name) );

      FileFindClose(search_handle);
   }
   else
      Print("Files not found!");

the result is:

2014.03.19 10:16:23.483 #Test EURUSD,H1: file_name = Test5.tx
2014.03.19 10:16:23.483 #Test EURUSD,H1: file_name = Test4.tx
2014.03.19 10:16:23.483 #Test EURUSD,H1: file_name = Test3.tx
2014.03.19 10:16:23.483 #Test EURUSD,H1: file_name = Test2.tx
2014.03.19 10:16:23.483 #Test EURUSD,H1: file_name = Test1.txt

the FileFindNext function cut the last character

Thanks

espinakas
16
espinakas 2014.03.27 07:25  

I got the same with Build 625, only the first match returns full file_name

   string filt=InpFolder+"\\"+InpFilter;
   long search_handle=FileFindFirst(filt,file_name);
   if(search_handle!=INVALID_HANDLE){
      do{
         if(FileIsExist(InpFolder+"\\"+file_name))
            Print("Found & exists :"+file_name);
         else
            Print("Found &~exists :"+file_name);
         
      } while(FileFindNext(search_handle,file_name));

      FileFindClose(search_handle);
   } else
      Print("No files found!");


2014.03.27 08:03:46.623	Conv_CSV EURUSD,M1: Found &~exists :XAUUSD1.cs
2014.03.27 08:03:46.623	Conv_CSV EURUSD,M1: Found &~exists :USOil1.cs
2014.03.27 08:03:46.623	Conv_CSV EURUSD,M1: Found &~exists :USDJPY1.cs
2014.03.27 08:03:46.623	Conv_CSV EURUSD,M1: Found &~exists :USDCHF1.cs
2014.03.27 08:03:46.622	Conv_CSV EURUSD,M1: Found &~exists :US301.cs
2014.03.27 08:03:46.622	Conv_CSV EURUSD,M1: Found &~exists :ITA401.cs
2014.03.27 08:03:46.622	Conv_CSV EURUSD,M1: Found & exists :GER301.csv
2014.03.27 08:03:46.622	Conv_CSV EURUSD,M1: initialized

As It was my first time using these functions, I workarounded and didnt further research.

Any idea?

qjol
3243
qjol 2014.03.27 09:40  
Bug
Alain Verleyen
Moderator
28522
Alain Verleyen 2014.03.27 09:42  
espinakas
16
espinakas 2014.03.27 11:44  
angevoyageur:
You have to report it to the ServiceDesk of Metaquotes.

Just done. Thanks.
/
To add comments, please log in or register