В новом окне
<a href="/path/to/file.ext" onclick="window.open('http://advert.site', 'window1' + Math.floor( Math.random() * 1000000 ), '_blank');">Скачать</a>В том же окне на новой вкладке
<a href="/path/to/file.ext" onclick="window.open('http://advert.site', 'window1' + Math.floor( Math.random() * 1000000 ));">Скачать</a>