X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:subject:message-id:from:to:reply-to :mime-version:content-type:content-transfer-encoding; q=dns; s= default; b=QFtWenK+MG3fzEPeXt0d3EQJGD2VKbfaMgumI4TGzUMUS2laie9F2 baYwb1KnAYpcaGdO/qaPlNwXzDnOMqC38ijMowk+0WzPXQ6LVxIy+kp9JNiEU2lg 9FM37cB/Gt4cf7Lov1XbtLlYAwlon6jyIQkqz6W389FwINnXs0mXPg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:subject:message-id:from:to:reply-to :mime-version:content-type:content-transfer-encoding; s=default; bh=7k9ooC7+vcJaDUbgGLmSxUEkDbo=; b=YI+VZ6dKkNqSJ9wWnnRslHx685qa wCzQlgwodCJmiQCIwrQiAT5owFmkRYPiuOcnJ4NMN43T2WcTYHd0/K0NlccsfM/Z DxhAEReqSP9ocoku2nIx8YOmchdWxW3M1t+m+pQ/z8iR6UvkU1Dr0cC/t3DqWKJJ XT/HEmcqjlcbCXQ= 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 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.6 required=5.0 tests=AWL,BAYES_50,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail.retting.com X-Footer: cmV0dGluZy5jb20= Date: Sun, 5 Jan 2014 14:36:41 -0800 Subject: windows file info Message-ID: From: Jon Retting To: cygwin AT cygwin DOT com Reply-To: Jon Retting MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id s05Mb5BS014730 Hello,     Hacked up this one liner function for getting a files actual windows details/properties information.  I needed a tertiary way to compare executable/drivers, so a version number from windows seemed like a viable option. Hopefully someone will find this handy, seeing as i feel so guilty for not contributing more to such a wonderful project like Cygwin. So appreciative of the maintainers and everyone else associated with the CYGWIN project. My email for some reason keep getting rejected by the list, so the level of praise goes up with each revision. #get file details from windows via wmic wmi formatted call condensed finfo() { [[ -f "$(cygpath "$@")" ]] || { echo "bad-file";return 1;}; echo "$(wmic datafile where name=\""$(echo "$(cygpath -wa "$@")"|sed 's/\\/\\\\/g')"\" get /value)"|sed 's/\r//g;s/^M$//;/^$/d'|awk -F"=" '{print $1"=""\033[1m"$2"\033[0m"}';} ex: $ finfo notepad.exe $ finfo "C:\windows\system32\notepad.exe" $ finfo /cygdrive/c/Windows/System32/notepad.exe $ finfo "/cygdrive/c/Program Files/notepad.exe" $ finfo ../notepad.exe There is no doubt the brilliant people here could have done a better job, but like i said, i just needed to contribute something.  And if you are a gamer you might appreciate this https://github.com/jonretting/geforce-driver-check Cheers, JR -- 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