How can I get the list of files of a directory with the correct case of
letters
as they really appear and not in upper case as ADIR returns them.

Demetrios, Greece

Re: How can I get the list of files of a directory with the correct case of letters by Demetrios

Demetrios
Mon Jan 10 02:04:25 CST 2005

Please forgive me. I found the answer with Google.

I learned that this has changed since VFP 7.0
and the following code can do it:
----------------------
WSH can do so:
local oFSO, oFolder, oFile
clear
oFSO = crea('Scripting.FileSystemObject')
oFolder = oFSO.GetFolder(getdir())
for each oFile in oFolder.Files
? oFile.Name
next

-Stefan
-----------------------

Demetrios, Greece

"Demetrios Panayotakopoulos" <dpanayotakopoulos_my_dat@_my_ametro.gr> wrote
in message news:ODY6ppu9EHA.3944@TK2MSFTNGP12.phx.gbl...
> How can I get the list of files of a directory with the correct case of
> letters
> as they really appear and not in upper case as ADIR returns them.
>
> Demetrios, Greece
>
>



Re: How can I get the list of files of a directory with the correct by SergeyBer

SergeyBer
Mon Jan 10 07:15:02 CST 2005

Demetrios Panayotakopoulos wrote:
> How can I get the list of files of a directory with the correct case of
> letters
> as they really appear and not in upper case as ADIR returns them.
>
> Demetrios, Greece
>
>

Demetrios,

ADIR() will return file name in the original case if you specify 1 as
fourth paramerer (flag).

--
--sb--

VFP MVP

Re: How can I get the list of files of a directory with the correct case of letters by Rick

Rick
Mon Jan 10 08:26:51 CST 2005

FYI: The ADIR() flag option was available starting in VFP 7.0 - before =
that you'll need to look outside VFP for a solution.

VFP 9.0 is safest, because ADIR() isn't limited to 13,000 entries in a =
directory (folder) - it's only limited by your available memory (really =
a maximum of 400,000,000 entries!).

Rick

"SergeyBer" <user@domain.invalid> wrote in message =
news:OcoXgax9EHA.3368@TK2MSFTNGP10.phx.gbl...
> Demetrios Panayotakopoulos wrote:
>> How can I get the list of files of a directory with the correct case =
of
>> letters
>> as they really appear and not in upper case as ADIR returns them.
>>=20
>> Demetrios, Greece
>>=20
>>=20
>=20
> Demetrios,
>=20
> ADIR() will return file name in the original case if you specify 1 as=20
> fourth paramerer (flag).
>=20
> --=20
> --sb--
>=20
> VFP MVP