WinFakt! - (7759 of 826522 - 1%) 

 Home | Tips & Tricks | General Info | Downloads | NG Archive | Links | Email | Search | Register | Users | Login

 


 

Tips & Tricks

 

Rating: 60% (1 votes registred)
Rate this item:

Back to list

Is there fRename function that works with Long File Names?

Yes, there is! ;-))
There is a MoveFileA function in the Windows API to accomplish that. We can make a wrapper for it like this:

DLL32 FUNCTION                        ;
            RENAMELFN( cSource AS LPSTR,    ;
                 cTarget AS LPSTR)    ;
      AS BOOL PASCAL FROM "MoveFileA" ;
      LIB "Kernel32.DLL"

We can use it this way:

RenameLFN("c:\my documents\Letter to Bill.doc",;
                     "c:\my documents\Letter to Hillary.doc" )  

 

 

 

 

© 2002 Bekz.net, Inc. All Rights Reserved.