>>Hi:
>>
>> I found something which I'd like someone else to test.
>> If it holds true, it should be good to let everyone know.
>>
>> If you try to edit a file in VFP5 using it's short file name,
>> VFP5 will erase the original file!
>>
>> I know it's not usual to do that but sometimes, especially after 10 or 12
>> straight hours of coding, one can be tempted to do it.
>>
>> MODI COMM THIS_IS_A_VERY_LONG_FILE_NAME && of course my filenames are not THAT long
>> Write something and save
>> MODI COMM THIS_I~1 && the short filename
>> File is empty!!!!!!!!!
>> MODI COMM THIS_IS_A_VERY_LONG_FILE_NAME && original file
>> File is empty!!!!!!!!!
>>
>> Please let me know if the same holds true for you.
>> Is it documented in the KB or BUG LIST?
>
>
>I checked it , you are true.
>Can you tell me to how to find the shortname from the long file name and
>how to find the longname from the short file name ?
The Windows Filenames class available in the download section (Win32 and other APIs) returns both the DOS filename (short) and the extended filename (long). You can use either as a parameter in the .FindFile() function.
hth,
George
Ubi caritas et amor, deus ibi est