Board index » cppbuilder » Create file on FAT16 without long file names

Create file on FAT16 without long file names

I want to create a file on a FAT16 formatted volume and only create the
8.3 format MS-DOS style file name. I don't want the extra directory
entry for the long file name. Does anyone know how to do this?
--
Simon Elliott
http://www.ctsn.co.uk/
 

Re:Create file on FAT16 without long file names


Simon Elliott,

Quote
> I want to create a file on a FAT16 formatted volume and only create the
> 8.3 format MS-DOS style file name. I don't want the extra directory
> entry for the long file name. Does anyone know how to do this?

Just don't use file names that are non 8.3 compliant.

This isn't just a question of length as some characters (lower case
letters for instance) will trigger long name entries. As long as you
stick to upper case alphas and numerics you should be fine.

Andrue Cope
[Bicester, UK]

Re:Create file on FAT16 without long file names


Quote
"Andrue Cope" <not.a.va...@email.address.sorry> wrote in message

news:VA.00001c8e.06982ff7@email.address.sorry...
Simon Elliott,

Quote
> Just don't use file names that are non 8.3 compliant.

My brain hurts - too many negatives! <g> :)

Pete

Re:Create file on FAT16 without long file names


Quote
"Simon Elliott" <si...@nospam.demon.co.uk> wrote in message

news:LIK3XIAkK8t+IwxA@courtlands.demon.co.uk...

Quote
> I want to create a file on a FAT16 formatted volume and
> only create the 8.3 format MS-DOS style file name. I don't
> want the extra directory entry for the long file name. Does
> anyone know how to do this?

Have a look at the GetShortPathName() function.

Gambit

Re:Create file on FAT16 without long file names


Andrue Cope <not.a.va...@email.address.sorry> writes

Quote
>> I want to create a file on a FAT16 formatted volume and only create the
>> 8.3 format MS-DOS style file name. I don't want the extra directory
>> entry for the long file name. Does anyone know how to do this?

>Just don't use file names that are non 8.3 compliant.

>This isn't just a question of length as some characters (lower case
>letters for instance) will trigger long name entries. As long as you
>stick to upper case alphas and numerics you should be fine.

I'll give this a try. I was under the impression that CreateFile() made
a long file name entry even if this wasn't required.
--
Simon Elliott
http://www.ctsn.co.uk/

Re:Create file on FAT16 without long file names


Simon Elliott,

Quote
> I'll give this a try. I was under the impression that CreateFile() made
> a long file name entry even if this wasn't required.

Shouldn't do. I've just checked under Win2K and it doesn't do it.

Andrue Cope
[Bicester, UK]

Other Threads