Probably i don't see the obvious, but i can't find an access to "FileInfo" for the "stem"-part of the path, i.e. for
D:MyFile.txt
the "MyFile" part.
There's extension, directoryname, fullname, but no "stem"
FileInfo:Stem?
FileInfo:Stem?
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
FileInfo:Stem?
Hi Karl,
its seems so....
Maybe you have to write that yourself....
And then retrieve the extension, get the relative length and use only the left x characters.
Wolfgang
its seems so....
Maybe you have to write that yourself....
Code: Select all
static method GetFilenameFromPath( cFullPath as string ) as string
local nPos as int
local cReturn as string
if ( nPos := cFullPath:LastIndexOf( Path.DirectorySeparatorChar ) ) <= 0
cReturn := cFullPath
else
if cFullPath:Length > ( nPos + 1 )
cReturn := cFullPath:Substring( nPos + 1 )
else
cReturn := ""
endif
endif
return cReturn
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
FileInfo:Stem?
Karl,
System.IO.Path.GetFileNameWithoutExtension()
Robert
System.IO.Path.GetFileNameWithoutExtension()
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
FileInfo:Stem?
Robert,
thx, works. But why the didn't add the access, (using this call) is beyond me
thx, works. But why the didn't add the access, (using this call) is beyond me
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)