Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Extract the file name from the full file path

Extract the file name from the full file path

Scheduled Pinned Locked Moved C / C++ / MFC
help
22 Posts 10 Posters 26 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Andy Moore

    How about PathFindFileName in shlwapi.dll?

    Pax Domini sit semper vobiscum

    C Offline
    C Offline
    CodingLover
    wrote on last edited by
    #21

    Thanks pal. But I think dealing with ReversFind() is so easy. :-O

    I appreciate your help all the time... Eranga :)

    1 Reply Last reply
    0
    • D David Crow

      Or what about those that are named file.jpg.exe on machines with "Hide extensions for known file types" turned off? The possibilities are not endless, but there are several of them to consider when rolling your own implementation.


      "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

      "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

      B Offline
      B Offline
      Blake Miller
      wrote on last edited by
      #22

      Some people just like that thunking feeling they experience as they keep banging their head upon the wall ... :rolleyes: I can't wait to see what turds float to the surface the moment a customer passes a network file path into that garbled up code! I also like the code examples you come across that assume the 'path' starts after the semicolon. Oh, wait the path "\\Dev\Link\Shared\MyFile.Txt" does not have a semicolon, how can this be :laugh:

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups