Hi, Tracy -
A "rename" operation is, in essence, the same as a "move" operation. You can utilize the MoveFileW Windows API function:
// External Function Declaration to move a file or directory
FUNCTION Boolean MoveFile ( &
String lpExistingFileName, &
String lpNewFileName &
) LIBRARY "kernel32.dll" ALIAS FOR "MoveFileW"
Online documentation here:
https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-movefilew
Depending on your needs, there is also a MoveFileExW API function:
https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-movefileexw
It utilizes a third argument value that specifies bit flags. In C/C++, it is declared as a DWORD. In PB, this is equivalent to an UnsignedLong.
Best regards, John
ls_RunCommand = 'cmd /c rename "' + ls_full_path + '" "' + ls_description + '"'
~~~Tracy