>>
>>If you want a correct and professional programmation
>>you have to use the windows's API.
>>The whole rest is made for the "young marmots".
>>
>>
>>DECLARE INTEGER MoveFile IN Win32API ;
>> STRING @lpExistingFileName, ;
>> STRING @lpNewFileName
>>
>>oldName = "FILE$$$"
>>newName = "FILEnew$$$"
>>STRTOFILE("x",m.oldName)
>>? FILE(m.oldName),FILE(m.newName)
>>
>>IF MoveFile(@m.oldName,@m.newName) > 0
>> ? "ok"
>>ELSE
>> ? "error"
>>ENDIF
>>? FILE(m.oldName),FILE(m.newName)
>>
>>
>>MoveFileEx is better.
>
>Thanks, but I do not know the file name in advance. The first problem is how to get the proper end exact file name when reviewing the directory contents.
read the directory with the others window's API.