X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=1.6 required=5.0 tests=AWL,BAYES_50,DKIM_ADSP_CUSTOM_MED,EXECUTABLE_URI,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_NUMERIC_HELO,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Hongyi Zhao Subject: Re: The -O option of curl under cygwin. Date: Tue, 3 Jan 2012 03:50:32 +0000 (UTC) Lines: 31 Message-ID: References: <4F01C45D DOT 9090306 AT gmail DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User-Agent: Pan/0.134 (Wait for Me; GIT 9383aac --track) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Mon, 02 Jan 2012 15:51:09 +0100, marco atzeri wrote: > I think you misunderstood the curl documentation, > in this way it works as you expect > > curl -L > http://mirrors.ctan.org/systems/win32/miktex/setup/setup-2.9.4321.exe -o > ./miktex/setup/setup-2.9.4321.exe --create-dirs Thanks for your hints. But you can see the following explanations in the curl documentation: -O/--remote-name Write output to a file named as the remote file Furthermore, in my case the destination folder, i.e, ./miktex/setup/, already exists there, so I shouldn't trouble the --create-dirs option. I only want to put the setup-2.9.4321.exe in the destination folder without giving the destination filename, i.e, let curl use the filename appeared in the remote site/webpage to name the downloaded file automatically. Any hints for my purpose? Regards -- .: Hongyi Zhao [ hongyi.zhao AT gmail.com ] Free as in Freedom :. -- .: Hongyi Zhao [ hongyi.zhao AT gmail.com ] Free as in Freedom :. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple