Winamp Forums Inetc and local file names

 20th February 2011, 11:52 #2 MSG Major Dude   Join Date: Oct 2006 Posts: 1,841 err... I think you're confusing local and server filenames. If you have the URL to a file on a server, then that URL already contains the exact filename. How else, after all, could the server know what it should send to the user? When you download http://example.org/foo/bar.baz , the file 'bar.baz' will be downloaded to your computer. The name you give it locally, on your computer, is entirely up to you. I never used inetc, but I would expect that, by default, it saves a file to its own name. So $INSTDIR\bar.baz, to follow the above example.  20th February 2011, 11:58 #3 zivha Junior Member Join Date: Aug 2010 Posts: 44 MSG - I am not confusing but maybe my explanation was not worded very well. Lets take your example, http://example.org/foo/bar.baz - I'd like inetc to do exactly what you said save the file locally as bar.baz - the problem is that according to the inetc plugin you must supply a local file name so inetc get would look something like: inetc::get http://example.org/foo/bar.baz "bar.baz" I need to specify the file name which I can not really know... And by the way the URL does not need to always specify the file name the server has many ways of knowing the filename and the filename can be returned as a Content-Disposition http header - which is why just parsing the URL is not a safe way to figure out the filename, you need to actually HEAD the URL and parse the headers which I assume inetc is already doing.  20th February 2011, 12:44 #4 jiake Senior Member Join Date: Oct 2007 Location: Xi'an, China Posts: 194${WordFind} "http://example.org/foo/bar.baz" "/" "-1" $R0 inetc::get "http://example.org/foo/bar.baz"$R0 An NSIS fan from China, my name is Jia Ke (pinyin). Email: jiake@vip.qq.com Messenger: jiake@live.in QQ (Chinese IM): 550771955