Jump to Real's How-to Main page

Rename a file

Simply "move" it under a new name with the function
[local function declaration]
FUNCTION BOOLEAN MoveFileA(STRING oldfile, STRING newfile) &
LIBRARY "KERNEL32.DLL"
Remember that PB10.5 is Unicode so you need to add the ;ANSI suffix to the declaration,
[local function declaration]
FUNCTION BOOLEAN MoveFileA(STRING oldfile, STRING newfile) &
LIBRARY "KERNEL32.DLL" ALIAS FOR "MoveFileA;ansi"

If you find this article useful, consider making a small donation
to show your support for this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2007
[ home ]