Delphi Programming

  1. Home
  2. Computing & Technology
  3. Delphi Programming
Glossary|Tips/Tricks|FREE App/VCL|Best'O'Net|Books|Link Back

Delphi Programming RTL Reference|By Category|Alphabetically|By Unit
 

ExtractShortPathName

unit
Sysutils
category
file name utilities

declaration
function ExtractShortPathName(const S: FullFileName): string;

description
Returns 8.3 format for a given full path and file name.

If FullFileName contatins no directory or drive information, the result is an empty string.

example
var s,ss : string;

s  := 'C:\Documents and Settings\Default User\
      Application Data\Microsoft\Internet Explorer\
	  brndlog.txt';
	  
ss := ExtractShortPathName(ss);

//ss = 'C:\DOCUME~1\DEFAUL~1\
       APPLIC~1\MICROS~1\INTERN~1\
	   brndlog.txt'

in real code

see also
From/To the 8.3 Format To/From The Long Format,


 Free Delphi code snippet inside every Delphi Newsletter!
Subscribe to the Newsletter
Name
Email

 Got some code to share? Got a question? Need some help?

Explore Delphi Programming

About.com Special Features

Delphi Programming

  1. Home
  2. Computing & Technology
  3. Delphi Programming

©2009 About.com, a part of The New York Times Company.

All rights reserved.