Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » How to get Directory-Name from String
How to get Directory-Name from String [message #10118] Thu, 21 June 2007 11:36 Go to next message
michael is currently offline  michael
Messages: 153
Registered: May 2007
Location: Germany
Experienced Member
I use this to select a directory:
fs.ExecuteSelectDir("Quelle auswählen");
String quelle = fs.GetActiveDir();

The result is:
C:\test

How can i get only the real directoty-name without the path?

When i select C:\test i only want to get test.

Michael
Re: How to get Directory-Name from String [message #10119 is a reply to message #10118] Thu, 21 June 2007 12:06 Go to previous messageGo to next message
Zardos is currently offline  Zardos
Messages: 62
Registered: April 2007
Member
michael wrote on Thu, 21 June 2007 11:36


How can i get only the real directoty-name without the path?

When i select C:\test i only want to get test.

Michael


Try:

String quelle = GetFileName(fs.GetActiveDir());

- Ralf
Re: How to get Directory-Name from String [message #10120 is a reply to message #10118] Thu, 21 June 2007 12:11 Go to previous message
michael is currently offline  michael
Messages: 153
Registered: May 2007
Location: Germany
Experienced Member
Perfect, this works.

Thanks

Michael
Previous Topic: Format of GetSysTime()
Next Topic: time format from no. of seconds
Goto Forum:
  


Current Time: Fri Mar 29 16:41:39 CET 2024

Total time taken to generate the page: 0.01831 seconds