How to Get the longfilename from a file?



How to Get the longfilename from a file?..

Answer / Amita Yadav

In Delphi, you can use the `ExtractFilePath` and `ExtractFileName` functions along with `PathAddExtension` function to get the long filename. Here's an example:nn```delphinfunction GetLongFilename(const FileName: string): string;nbeginn Result := PathAddExtension(ExtractFilePath(FileName) + ExtractFileName(FileName)) + '' + ExtractFileName(FileName);nend;n```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Delphi Interview Questions

How to insert contents of a file at current position in TMemo?

1 Answers  


How to Converta RGB color to a CMYK color?

1 Answers  


Why is there no "Save" button in the save dialog box?

1 Answers  


How to Change delphi default directory?

1 Answers  


Specify a DefaultExpression for a TField object?

1 Answers  


How to Broadcast a message?

1 Answers  


How to Convert Data in Paradox Tables to InterBase Using Delphi?

1 Answers  


How to Send a file via DCOM ?

1 Answers  


"DAX Error - Name not unique in this context" . what does this error mean?

1 Answers  


How to Copy a information from one memo field to another using TBlobStream ?

1 Answers  


What is DBGo?

1 Answers  


Where can we obtain the help file for the VtChart component?

1 Answers  


Categories