Show a message after file_transfer is executed I am using file_transfer to send a download to the http client.
The problem is that file_transfer executes drupal_exit so that no more code is executed after it.
How do you show a message or redirect to another page after sending a file_transfer ?
By default, you can't - when someone clicks a link to a file that's force-downloaded, it happens as a separate request/process entirely. For security reasons your web site will not be able to tell when/if that download has completed.

I think the easiest thing you can do is implement some javascript on the download link, which auto-refreshes the page as soon as you've clicked it, and while the file is still downloading. You could use a query string or similar to note that a message should be displayed or that a redirect should happen.

If you need something more complicated, you might be able to implement an AJAX-based polling mechanism, which contacts the server and checks the connection status for that file. It's not a trivial task though, and I think you'd need to change the file_transfer module quite a bit to implement that. It also might require some advanced server configuration. All beyond the scope of Drupal, so I'd advise getting a solution working independently first, and only then worry about getting it inside Drupal.

There are some ideas here, and related logic here