create short-filename

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lumpybanana247
    New Member
    • Apr 2007
    • 134

    #1

    create short-filename

    converting a short file name to a long file name
    (ex. c:\\program files\\common files\\blah blah blah\\)
    to
    (ex. c:\\progra~1\\c ommon~1\\blahbl ~1\\)

    to get a short file name...
    you get the name (ex. program files)
    you delete all the spaces (ex. programfiles)
    you remove all but the first 6 characters (ex. progra)
    and you add ~1 to the end (ex. progra~1)

    if thats all you had to do, i could simply make a function to do so by using easy functions, but i would have to somehow seperate (program files) from the rest of the directory (c:\\program files\\common files\\blah blah blah\\)
    is there and easier way to do this OR does anybody have a premade script to do this?


    thank you

    PS: i know that if there is (C:\\program files) and (C:\\programing ) then it messes things up because (C:\\programmin g) would have to be (C:\\progra~2) but that doesnt matter to me
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    Start reading here.

    Functions are already written to convert to short file names.

    Comment

    Working...