Deutsch   English   Français   Italiano  
<100fs62$1o4dn$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: et99 <et99@rocketship1.me>
Newsgroups: comp.lang.tcl
Subject: Re: Problems with paths of Windows
Date: Mon, 19 May 2025 11:10:10 -0700
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <100fs62$1o4dn$1@dont-email.me>
References: <100ae16$fom5$1@dont-email.me> <100aepq$frvv$1@dont-email.me>
 <ba04ce42-d26a-4adf-a9ac-45b5d5266e5e@yahoo.com>
 <100co5a$10n61$1@dont-email.me> <100dboq$1544i$1@dont-email.me>
 <bb0734bd-8416-4882-827e-3532897ef3cb@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 19 May 2025 20:10:11 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="66ef778719378492c2fb012193652ff5";
	logging-data="1839543"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX197JzNshfRRzNsbTcu9bqXs"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:XFd17KJ3M1KumEdQzFzgd1o4EWU=
Content-Language: en-US
In-Reply-To: <bb0734bd-8416-4882-827e-3532897ef3cb@yahoo.com>

On 5/18/2025 9:48 PM, Luis Alejandro Muzzachiodi wrote:
> Thanks for your answers, but it seems I haven't been able to express my question clearly.
> The question isn't about why the input isn't valid (it's a string, the slash is problematic, the spaces, etc.), but rather whether there's a reasonably simple way to make that input valid. Obviously, the simplest way would be to write the parameter "correctly." However, this comes through a procedure that allows the user to load one or more paths to add to those defined in the script, meaning it's not up to me. As I said, I tried several solutions, but they didn't work: automatically converting the parameter to a list, using the file normalize and/or nativename commands, or, as a first idea, checking whether the parameter is a list or a string (spoiler: in TCL, everything is a string...). Having said all that, I hope I've clarified the point of the question, and again, thanks for answering.

If what you want is a way to unmangle a mangled filename, I would say there is no reasonably simple way to do this.

If there are only a few valid directories to choose from, and you can generate a list of them, then an "almost equal" function might do this, but likely not with 100% accuracy.

I have an application uses a fuzzy string compare function that produces a value that is a measure of a near match. I got the idea and some code from here, in particular I use the trigrams function:

https://wiki.tcl-lang.org/page/Fuzzy+string+search