Results 1 to 3 of 3

Thread: How to get just the filename from full file path?

  1. #1
    Join Date
    Apr 2009
    Posts
    63
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Windows

    Default How to get just the filename from full file path?

    If I have a file path like C:/temp/foo.txt, is there a convenient, proper, cross-platform way to extract just the "foo.txt" part? Thx.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to get just the filename from full file path?

    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Apr 2009
    Location
    Valencia (Spain)
    Posts
    245
    Thanks
    38
    Thanked 19 Times in 19 Posts
    Qt products
    Qt4
    Platforms
    Symbian S60

    Default Re: How to get just the filename from full file path?


Similar Threads

  1. How to print only the file name of a path
    By franco.amato in forum Qt Programming
    Replies: 3
    Last Post: 2nd October 2008, 21:28
  2. File path issue...
    By kaushal_gaurav in forum Qt Programming
    Replies: 9
    Last Post: 1st October 2008, 15:36
  3. Problem to find file path
    By phillip_Qt in forum Qt Programming
    Replies: 14
    Last Post: 28th April 2008, 10:06
  4. Problems with korean symbols in file path
    By Raistlin in forum Qt Programming
    Replies: 5
    Last Post: 6th April 2008, 13:59
  5. getting absolute file path of Qt resources
    By dvmorris in forum Qt Programming
    Replies: 6
    Last Post: 18th April 2007, 02:56

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.