# Import file from website using process indiciator

Would it be possible to have some sort of progress indicator for downloading files?

For example if we would like to import: Import["http://lieanalysis.com/exampledata/os.mx"]

It would take a while, it would be nice if you have some sort of progress indicator (like mathematica uses for ExampleData)

• @Kuba can't believe i've missed that. Thanks – Frank Martin Dec 6 '16 at 13:52

## 1 Answer

Use URLSaveAsynchronous to download, then Import the downloaded file. There's an example in the documentation about progress bars.

Be aware that I experienced some problems with this function. In version 11 sometimes it would get stuck after the download has finished. See the discussion:

• Thanks for your answer, somehow I must have overlooked this function. Will accept you answer when I'm allowed :) – Frank Martin Dec 6 '16 at 13:53
• @FrankMartin Well, there's URLSave, URLFetch, URLFetchAsynchronous, URLSubmit, URLDonwload, URLRead, Import, HTTPRequest and so on and so on. Some are deprecated and won't show up in auto-completion. Not so easy to find the right one. Once again be careful because this kept hanging for me on Windows when wrapped in WaitAsynchronousTask. – Szabolcs Dec 6 '16 at 13:56
• Maybe it is worth mentioning that "Content-Length" header has to be present for progress indicator to show progress correctly. It usually is there but happened to me that it wasn't. – Kuba Dec 6 '16 at 13:56