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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. how to get long file name (instead of old 8.3 notation)

how to get long file name (instead of old 8.3 notation)

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
3 Posts 2 Posters 0 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.
  • C Offline
    C Offline
    csc
    wrote on last edited by
    #1

    i'm using this code snippet to create a temp file name : CString CUtil::CreateTempFileName( void ) { CString cs = ""; TCHAR szTempName[_MAX_PATH]; TCHAR szPath[_MAX_PATH]; if(GetTempPath(sizeof(szPath), szPath) != 0) { if(GetTempFileName(szPath, _T("csc"), 0, szTempName) != 0) { cs = szTempName; } } return( cs ); } Its results in something like : c:\DOKUME~1\USERKE~1\LOKALE~1\Temp\csc14.tmp Anybody with an idea how to get the (real) long file name instead of this old 8.3 notation ? Thank's for any hint ! :)

    S 1 Reply Last reply
    0
    • C csc

      i'm using this code snippet to create a temp file name : CString CUtil::CreateTempFileName( void ) { CString cs = ""; TCHAR szTempName[_MAX_PATH]; TCHAR szPath[_MAX_PATH]; if(GetTempPath(sizeof(szPath), szPath) != 0) { if(GetTempFileName(szPath, _T("csc"), 0, szTempName) != 0) { cs = szTempName; } } return( cs ); } Its results in something like : c:\DOKUME~1\USERKE~1\LOKALE~1\Temp\csc14.tmp Anybody with an idea how to get the (real) long file name instead of this old 8.3 notation ? Thank's for any hint ! :)

      S Offline
      S Offline
      Stephen Hewitt
      wrote on last edited by
      #2

      Have a look at the GetLongPathName function. Steve

      C 1 Reply Last reply
      0
      • S Stephen Hewitt

        Have a look at the GetLongPathName function. Steve

        C Offline
        C Offline
        csc
        wrote on last edited by
        #3

        Is working ... thank's a lot :-D

        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