Re: Problem with extract EXT + NOEXT
"Fer" <[email protected]>
| Newsgroups | gmane.comp.windows.gui4cli |
|---|---|
| Message-ID | <[email protected]> |
Hi Chris
You should consider this behaviour as a bonus, not only
capable of retrieving the extension of a file name, but also
capable of retrieving (part of) folder names that contain dots.
I always preceed extract ... ext/noext with extract ... file
when I want to know the file extension. Just to be sure that
the extension applies to the file name only and not to the whole
file path.
fer
> I never encountered this problem because I used "decent" file paths myself
> but when I started to use directory names with dots for testing purpose
> I found the following problem.
>
> I used to use this code for xReqfile SAVE ... where the files to save
> are of a particular type, say xyz and has to be saved in a sub folder
> of the install directory.
>
> ReqFile SAVE "Save xyz file" "#$path" temp "xyz files.../*.xyz"
> if $temp = ''; return; endif
> extract temp NOEXT
> appVar temp '.xyz'
>
> I use this because it's not clear if the user added a extension or not.
>
> C:/program v1.0.7/user_filename.xyz
>
> Now if the user added a extension like above, there is no problem
> but when he/she didn't, like...
>
> C:/program v1.0.7/user_filename
>
> "extract temp NOEXT" results in this...
>
> C:/program v1.0
>
> I suppose the function searches backwards till it finds the
> first dot but it should stop searching when it finds the first
> slash or backslash.
>
> I think it's a small change and if you are planning a new
> Gui4Cli version in the future, can you change this?
>
> Thanks in advance,
>
> Chris
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/gui4cli/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/gui4cli/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/