Board index » delphi » long file name -> short file name?

long file name -> short file name?

My problem is this:

I need to tell Tmediaplayer a file name. Sometimes this file name can be
long (e.g. This is a sound.wav), and Tmediaplayer won't accept a long
file name (e.g. mediaplayer1.filename:='This is a sound.wav';). Is it
possible to tell Tmediaplayer the corresponding MS-DOS file name (e.g.
thisis~1.wav), and if is, how?

Seppo

 mailto:seppo.virta...@utu.fi              http://www.utu.fi/~seaavi
***********************************************************************

 

Re:long file name -> short file name?


Quote
>I need to tell Tmediaplayer a file name. Sometimes this file name can be
>long (e.g. This is a sound.wav), and Tmediaplayer won't accept a long
>file name (e.g. mediaplayer1.filename:='This is a sound.wav';). Is it
>possible to tell Tmediaplayer the corresponding MS-DOS file name (e.g.
>thisis~1.wav), and if is, how?

Check out the GetShortPathName win32 function. It will convert long names
into short names.

Other Threads