delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/12/20/16:58:47

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-10.2 required=5.0 tests=AWL,BAYES_00,KHOP_PGP_SIGNED,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_RG,TW_YG,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <50D38A03.3050608@redhat.com>
Date: Thu, 20 Dec 2012 14:58:27 -0700
From: Eric Blake <eblake AT redhat DOT com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: argv @-expansion with pathname containing spaces
References: <20121219162048 DOT GA4564 AT qp9482> <CAEhDDbDcoiKng6D2zqb-_xKrMUnt_H8Lj7FNPgXnMfis0R9mpw AT mail DOT gmail DOT com> <20121220115536 DOT GA300 AT qp9482> <CA+sc5mmhQiSseK3279nSW-0xwyODzMUYEY13pb_CJpwD6QTmng AT mail DOT gmail DOT com> <DB2D51D9-47EB-4609-A28E-9FF0FA1E5472 AT Denis-Excoffier DOT org>
In-Reply-To: <DB2D51D9-47EB-4609-A28E-9FF0FA1E5472@Denis-Excoffier.org>
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
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

--------------enig334AA73FA0DC8224460000E2
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 12/20/2012 02:34 PM, Denis Excoffier wrote:
> On 2012-12-20, 18:49, Earnie Boyd wrote:
>> On Thu, Dec 20, 2012 at 6:55 AM, Denis Excoffier wrote:
>>> However i don't see how to
>>> derive the 8.3 form from my original filename, using DOS only.
>>
>> The /X argument to cmd.exe's dir command will give you the 8.3 name if
>> it exists.  Note that your system can be configured to not produce the
>> 8.3 form.
>=20
> I tried 'dir /X %pathname%', or 'dir /X /B %pathname%' (and other combina=
tions),
> i can produce "some" 8.3 strings, bug was unable to produce the replaceme=
nt
> of the full path (with 8.3 strings replaced everywhere). And setting the
> result in another variable seems another challenge=E2=80=A6

If you put cygpath in the PATH visible to your DOS shell, then 'cygpath
-sw [-a]' can come up with the relative or absolute 8.3 name of any
path.  But I don't know if that counts as what you were looking for.

--=20
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


--------------enig334AA73FA0DC8224460000E2
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQEcBAEBCAAGBQJQ04oEAAoJEKeha0olJ0NqDFUIAIe16myoJcPgp41/Ds9zKG4M
SfNJK6/rn0VUtn6Q/rRYQZSfHfuRpE2jMtf+k2WV4NOlEd8J+GtyBJhJDGaN/rS9
PwCfZt6SuEr5iGmPHgULbNLOHWpaeroRq4BZHzfTroPBMdON+CWoBSUsGVAQyIMT
czj5R/h+654lPpn/YUa77Ao28IP6hAEn7RrI/7+ACe61IOl9WEgAku14VLeborC/
dAhyu/ve+QlYAkLStgn8tR5fQBJxz3WrrN0tFMMoAIq10ccLBYNhoBH+J4bchvjk
TOfE5SnyKRiOoRYMtC2ahAPj1rlNmp5WpLU73eZ9NS/KhAUMrX29MVjKqub7tbk=
=ZBpR
-----END PGP SIGNATURE-----

--------------enig334AA73FA0DC8224460000E2--

- Raw text -


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