Download MetaTrader 5

File Functions Problem

To add comments, please log in or register
Interested in the Market activity? Come and track!
Orlin Angelov
464
Orlin Angelov 2014.09.07 23:06 

Hi,

I am experiencing the following issue: When I try to get file properties in mql4 using FileGetInteger() it is working for all extensinons (at least those I tried) but is not working for .dll files. What I mean - when I try to check any property (FILE_EXISTS, FILE_CREATE_DATE, FILE_MODIFY_DATE etc.) I get -1 if the file is with .dll extension. When I change it to .dl or txt or anything else the function returns the requested property. What I want to accomplish - check if .dll file is present and if true Alert("File present") if false Alert("File Missing). Workaraounds accepted :) Thanks in advance to everyone who responds.

Ahmed Soliman
15714
Ahmed Soliman 2014.09.08 02:46  
bakop:

Hi,

I am experiencing the following issue: When I try to get file properties in mql4 using FileGetInteger() it is working for all extensinons (at least those I tried) but is not working for .dll files. What I mean - when I try to check any property (FILE_EXISTS, FILE_CREATE_DATE, FILE_MODIFY_DATE etc.) I get -1 if the file is with .dll extension. When I change it to .dl or txt or anything else the function returns the requested property. What I want to accomplish - check if .dll file is present and if true Alert("File present") if false Alert("File Missing). Workaraounds accepted :) Thanks in advance to everyone who responds.

Is this file exist inside allowed Files folders? 
Orlin Angelov
464
Orlin Angelov 2014.09.08 09:38  
Yes it is :) Try to use the FileIsExist() function with a test.txt located in the allowed folders. You get the result - it is there and existing. Then rename the extension from .txt to .dll - it is not existing and cannot be detected :( Anyway I found another way to check if .dll is presene - FindFileFirst() function.
To add comments, please log in or register