Re: Problems with paths of Windows

Liste des GroupesRevenir à cl tcl 
Sujet : Re: Problems with paths of Windows
De : et99 (at) *nospam* rocketship1.me (et99)
Groupes : comp.lang.tcl
Date : 19. May 2025, 19:10:10
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <100fs62$1o4dn$1@dont-email.me>
References : 1 2 3 4 5 6
User-Agent : Mozilla Thunderbird
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

Date Sujet#  Auteur
17 May 25 * Problems with paths of Windows11Luis Alejandro Muzzachiodi
17 May 25 `* Re: Problems with paths of Windows10saito
18 May 25  `* Re: Problems with paths of Windows9Luis Alejandro Muzzachiodi
18 May 25   +- Re: Problems with paths of Windows1saito
18 May 25   +- Re: Problems with paths of Windows1saito
18 May 25   `* Re: Problems with paths of Windows6Alan Grunwald
18 May 25    `* Re: Problems with paths of Windows5et99
19 May 25     `* Re: Problems with paths of Windows4Luis Alejandro Muzzachiodi
19 May 25      +- Re: Problems with paths of Windows1Ralf Fassel
19 May 25      +- Re: Problems with paths of Windows1Ralf Fassel
19 May 25      `- Re: Problems with paths of Windows1et99

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal