delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/07/09/13:20:57

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_THREADED,MSGID_FROM_MTA_HEADER,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE
X-Spam-Check-By: sourceware.org
Message-ID: <BLU0-SMTP224D901B80815ECFB99E3BCED30@phx.gbl>
Date: Mon, 9 Jul 2012 19:20:22 +0200
From: Aaron Schneider <notstop AT users DOT sourceforge DOT net>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Inconsistence on file operation when the name already exists with exe extension
References: <BLU0-SMTP193F74A0A7FC396B8160663CED30 AT phx DOT gbl> <20120709154456 DOT GA6696 AT ednor DOT casa DOT cgf DOT cx>
In-Reply-To: <20120709154456.GA6696@ednor.casa.cgf.cx>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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 09/07/2012 17:44, Christopher Faylor wrote:
> On Mon, Jul 09, 2012 at 05:23:13PM +0200, notstop wrote:
>> You must be right in some points, but that is not the exact behavior of
>> windows command although you pretend it to be (the powershell has a
>> different behavior). In fact, I can independently operate file while
>> file.exe exists:
>>
>> copy file.exe file
>> Now there are file and file.exe
>
> Common email practice is to include the text of the email you are
> responding to so that we can know who you are accusing of "pretending".
>
> Nevertheless, FYI, powershell is not Cygwin and no one is saying that
> the behavior you're seeing is mandated by Windows.  What you are seeing
> is a Cygwin accommodation for the fact that .exe is a special extension.
> Cygwin is not a new project.  Its handling of .exe has been hashed and
> rehashed throughout the life of the project.  The current behavior is
> the compromise that we've settled on.
>
> So, what you are seeing is expected.  Continuing to argue without
> familiarizing yourself with past discussions is not likely to expose
> anything new.
>
> --
> 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
>
>

Sorry for not quoting, server was including raw email addresses in reply 
and got several bounces.

About the issue

-- There is something I need to clarify about what I am referring to 
with windows shells --:

* Windows command is %SystemRoot%\System32\cmd.exe
* Windows Powershell is included by default in Windows 7 at 
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe

I believe that Cygwin tries to emulate cmd.exe

-- They both behave differently --.

For example when typing file.exe on a directory:

* powershell tries to locate the executable in PATH at any costs 
regardless if exists in present directory. In fact if exists, won't 
execute it directly, will give error "Suggestion [3,General]: The 
command file.exe was not found, but does exist in the current location. 
Windows PowerShell doesn't load commands from the current location by 
default. If you trust this command, instead type ".\file.exe"." and will 
force you to run .\file.exe

* cmd.exe will run the file.exe if exists in present directory, without 
the need to run it as .\file.exe ; if not will run from path environment 
variable.

** Other differences may exist.

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019