I need to download a file from http://nppes.viva-it.com/NPI_Files.html, the problem is that every month the filename changes. I was hoping to be able to use a wildcard in the filename, such as NPPES_Data_Dissemination_*.zip but that doesn’t work with WebClient. Are there any other ways to download this file programatically using c# without knowing the exact name of the file. There will always be 1 and only .zip file on this webpage…the program just won’t know exactly what that name is. Any ideas would be appreciated!!
Thanks!
There is no way to request a resource whose name you don’t know over HTTP.
Instead, make a WebRequest for http://nppes.viva-it.com/NPI_Files.html and parse it for the string you’re interested in, then request that; alternatively, get the NPI folks to provide a consistent name for the file (since there’s only one, perhaps it should be called _latest.zip or something?)