hundreds of MQL.LNK files

 
After an update MetaTrader5 started writing hundreds of .LNK files in the MetaTrader base directory

How do I avoid this?
Assuming I have the file "name.mq5" in the editor: a file "name.mql.lnk" is created

If I delete the file "name.mql.lnk" Just open MetaEditor and again a file "name.mql.lnk" will be created

For example: If I'm testing the file "name.mq5", as soon as I open MetaEditor a file "name.mql.lnk" is created.

For every time I run a test, a new file is created, and it looks like this:

name.mql.lnk

name.mql.lnk(1)

name.mql.lnk(2)

name.mql.lnk(3)

and so it goes....

Please any ideas?

 
Sergio Gelli: After an update MetaTrader5 started writing hundreds of .LNK files in the MetaTrader base directory How do I avoid this? Assuming I have the file "name.mq5" in the editor: a file "name.mql.lnk" is created. If I delete the file "name.mql.lnk" Just open MetaEditor and again a file "name.mql.lnk" will be created. For example: If I'm testing the file "name.mq5", as soon as I open MetaEditor a file "name.mql.lnk" is created. For every time I run a test, a new file is created, and it looks like this: and so it goes.... Please any ideas?
I don't think that is MetaTrader or MetaEditor doing that but something else. Are you perhaps using Junction points, Hard-links or Soft-links at the OS level for any of the files or folders being used by MetaTrader/MetaEditor?
 
Fernando Carreiro:
I don't think that is MetaTrader or MetaEditor doing that but something else. Are you perhaps using Junction points, Hard-links or Soft-links at the OS level for any of the files or folders being used by MetaTrader/MetaEditor?
I don't think MetaEditor is innocent in causing this problem simply because these files appear only when MetaEditor is running.
I've tested it now running only Metatrader and the problem doesn't occur.
Not even when MetaTrader is using an expert advisor.
Where do I find
Junction points, Hard-links or Soft-links?
 
Sergio Gelli: I don't think MetaEditor is innocent in causing this problem simply because these files appear only when MetaEditor is running. I've tested it now running only Metatrader and the problem doesn't occur. Not even when MetaTrader is using an expert advisor. Where do I find Junction points, Hard-links or Soft-links?

"name.mql.lnk" is a soft-link, but if you don't know what they are, then you probably are not using them at the OS level (unless you accidentally used the "mklink" command line tool).

Can you post the full directory path to the following:

  1. The "metatrader.exe" file.
  2. The "metaeditor.exe" file.
  3. The "Data Folder" as reported by the MetaTrader "Menu->File->Open Data Folder".
  4. The "Data Folder" as reported by the MetaEditor "Menu->File->Open Data Folder".
 
Also, may I suggest reinstalling MetaTrader from scratch to see if problem is resolved?
 
One more thing, to where do the ".lnk" files point to? If your right-click them and see the properties, to what file directory is it is linking?
 

Yes, another question. Are you sure that the names are?

  • name.mql.lnk(1)
  • name.mql.lnk(2)
  • name.mql.lnk(3)

Or are they?

  • name.mql(1).lnk
  • name.mql(2).lnk
  • name.mql(3).lnk
If they are "name.mql.lnk(?)" then you have hidden extensions enabled and the files have one more real extension that is not visible. You will probably have to right-click them and select Properties ("General "tab or "Details" tab), to see the final part of the true file name.
 
Fernando Carreiro:

"name.mql.lnk" is a soft-link, but if you don't know what they are, then you probably are not using them at the OS level (unless you accidentally used the "mklink" command line tool).

Can you post the full directory path to the following:

  1. The "metatrader.exe" file.
  2. The "metaeditor.exe" file.
  3. The "Data Folder" as reported by the MetaTrader "Menu->File->Open Data Folder".
  4. The "Data Folder" as reported by the MetaEditor "Menu->File->Open Data Folder".

1=c:\Program Files\MetaTrader 5

2=c:\Program Files\MetaTrader 5

3 and 4=c:\Program Files\MetaTrader 5

Fernando Carreiro:
Also, may I suggest reinstalling MetaTrader from scratch to see if problem is resolved?

I will try later

Fernando Carreiro:
One more thing, to where do the ".lnk" files point to? If your right-click them and see the properties, to what file directory is it is linking?

The files point to C:\Program Files\MetaTrader 5

Fernando Carreiro:

Yes, another question. Are you sure that the names are?

  • name.mql.lnk(1)
  • name.mql.lnk(2)
  • name.mql.lnk(3)

Or are they?

  • name.mql(1).lnk
  • name.mql(2).lnk
  • name.mql(3).lnk
If they are "name.mql.lnk(?)" then you have hidden extensions enabled and the files have one more real extension that is not visible. You will probably have to right-click them and select Properties ("General "tab or "Details" tab), to see the final part of the true file name.

uhmmm Sorry , that's is the correct:
c:/Program Files/MetaTrader 5/saidaBaixa.mq5.lnk
c:/Program Files/MetaTrader 5/saidaBaixa.mq5 (2).lnk
c:/Program Files/MetaTrader 5/saidaBaixa.mq5 (3).lnk

 
Sergio Gelli:

1=c:\Program Files\MetaTrader 5

2=c:\Program Files\MetaTrader 5

3 and 4=c:\Program Files\MetaTrader 5

I will try later

The files point to C:\Program Files\MetaTrader 5

uhmmm Sorry , that's is the correct:
c:/Program Files/MetaTrader 5/saidaBaixa.mq5.lnk
c:/Program Files/MetaTrader 5/saidaBaixa.mq5 (2).lnk
c:/Program Files/MetaTrader 5/saidaBaixa.mq5 (3).lnk

There is your problem! (3 & 4). You cannot have the Data Folder under the "Program Files". It is a restricted Windows directory with special permissions. Applications cannot manipulate data in those folders as Windows will prevent it. That is why it is creating soft-links.

The Data Folder has to be under the User Files structure or everything has to be in a separate folder in portable mode.

You probably inherited that structure form an old Windows setup but under newer versions of Windows, that is no longer allowed.

You will have to uninstall MetaTrader, clean up all the folders and then do a new clean installation so that files get placed in the correct location.

Alternatively, you would have to create your own folder structure elsewhere and use portable mode, but I suspect you will not know how to do that. So new clean installation is your best solution.

So, as I suspected, Meta Editor is not to blame, but the tighter Windows security is the one forcing that behaviour.

Reason: