1. walk_dir: upper & mixed case problem in "equal" test
		
			- Posted by Dan B Moyer <DANMOYER at PRODIGY.NET>
			Sep 10, 2000
 
			
						- 
				Last edited Sep 11, 2000			
 
					
		
I'm trying to use walk_dir to find the path for a specified file, and I'm
having trouble getting my program to *recognize* when it's found the file,
because of difficulty with uppercase/lowercase as perceived  & reported by
walk_dir, and then tested by "equal".
It seems that sometimes when a file is created, its filename is created in a
format which is read by walk_dir as ALL UPPERCASE, (such as all the
Euphoria files distributed by RDS), although they DON'T display that way on
all systems (ie, Win98) when shown in a directory listing (ie, they show as
all lowercase except for the first character); however, sometimes (perhaps
when the file is created on Win98 system or something?), the filename *as
reported by walk_dir* can be in a *mixture* of upper and lowercase, which is
like it IS displayed in a directory listing on the system.
So the upshot is, if a person goes to use the routine, and types in the file
name to find, if they don't type it in exactly the form it is returned by
walk_dir (all uppercase, all lowercase, or *mixture*), I can't get the
routine to recognize that it has found it.
I presume I could make some routine to take each file name as reported by
walk_dir and create *every* possible combination of upper/lower case for
every character in it,  to do the test against the target filename, but this
seems like it would make the walk_dir take a LOT longer to do.
Can anyone suggest a better approach?
Thanks,
Dan Moyer
		
	 
	
		
		2. Re: walk_dir: upper & mixed case problem in "equal" test
		
			- Posted by Dan B Moyer <DANMOYER at PRODIGY.NET>
			Sep 10, 2000
 
			
						- 
				Last edited Sep 11, 2000			
 
					
		
<sigh> nevermind.
It's so obvious it even occurred to me (in addition to others who responded
privately), that if I just put my target in uppercase, and then "upper()"
the return, I can validly test it just fine.  <sigh>
Dan
----- Original Message -----
From: "Dan B Moyer" <DANMOYER at prodigy.net>
To: "Euphoria Mail List" <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Sunday, September 10, 2000 8:26 PM
Subject: walk_dir: upper & mixed case problem in "equal" test
> I'm trying to use walk_dir to find the path for a specified file, and I'm
> having trouble getting my program to *recognize* when it's found the file,
> because of difficulty with uppercase/lowercase as perceived  & reported by
> walk_dir, and then tested by "equal".
>
> It seems that sometimes when a file is created, its filename is created in
a
> format which is read by walk_dir as ALL UPPERCASE, (such as all the
> Euphoria files distributed by RDS), although they DON'T display that way
on
> all systems (ie, Win98) when shown in a directory listing (ie, they show
as
> all lowercase except for the first character); however, sometimes (perhaps
> when the file is created on Win98 system or something?), the filename *as
> reported by walk_dir* can be in a *mixture* of upper and lowercase, which
is
> like it IS displayed in a directory listing on the system.
>
> So the upshot is, if a person goes to use the routine, and types in the
file
> name to find, if they don't type it in exactly the form it is returned by
> walk_dir (all uppercase, all lowercase, or *mixture*), I can't get the
> routine to recognize that it has found it.
>
> I presume I could make some routine to take each file name as reported by
> walk_dir and create *every* possible combination of upper/lower case for
> every character in it,  to do the test against the target filename, but
this
> seems like it would make the walk_dir take a LOT longer to do.
>
> Can anyone suggest a better approach?
>
> Thanks,
> Dan Moyer
>
>
>
>
>
>
		
	 
	
		
		3. Re: walk_dir: upper & mixed case problem in "equal" test
		
		
On 10 Sep 2000, at 20:26, Dan B Moyer wrote:
<snip>
> So the upshot is, if a person goes to use the routine, and types in the file
> name to find, if they don't type it in exactly the form it is returned by
> walk_dir (all uppercase, all lowercase, or *mixture*), I can't get the
> routine to recognize that it has found it.
>
> I presume I could make some routine to take each file name as reported by
> walk_dir and create *every* possible combination of upper/lower case for
> every character in it,  to do the test against the target filename, but this
> seems like it would make the walk_dir take a LOT longer to do.
>
> Can anyone suggest a better approach?
Yeas, upcase all the paths,, both the one found, and the one looked for, before
seeing
if they are equal.
Kat