CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Short file name

  1. #1
    Join Date
    Jul 2002
    Posts
    2,543

    Short file name

    I need a simple way to get short file name for display.
    For example, I have full file name
    C:\Dir1\Samples\Files\Doc\Figures.doc and maximum length 30, and result should be like this:
    C:\Dir1\...\Doc\Figures.doc.

    string s = ShortFileName("C:\\Dir1\\Samples\\Files\\Doc\\Figures.doc");

    // s = "C:\Dir1\...\Doc\Figures.doc"

    string ShortFileName(string fullName, int maxLen)
    {
    // ???
    }

  2. #2
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    to view the link click here



    GOTDOTNET C#.NET

    Paresh

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured