Rename File PASCAL Script returning Nothing To Do
Posted: Thu Jan 06, 2022 4:10 am
I’m working on the Syncovery for file transfer of Oracle files. I’m trying to run a simple PASCAL script to rename destination file names. The scripts I’m testing are those provided by Syncovery with no changes. Before the script is referenced in the profile, files are recognized. But after inserting the script, the profile is returning “Results: Nothing to do”. Can someone help this this problem?
OnReplaceFilenameLeftToRight Sample Script
This script will rename files when the file is copied from left to right. In our example, ‘-draft’ is added before the filename extension.
function OnReplaceFilenameLeftToRight(const FileName: UnicodeString;
const isFolder: Boolean):UnicodeString;
begin
if isFolder then
Result:=FileName
else
Result:=ChangeFileExt(FileName,'')+'-draft'+ExtractFileExt(FileName);
end;
OnReplaceFilenameLeftToRight Sample Script
This script will rename files when the file is copied from left to right. In our example, ‘-draft’ is added before the filename extension.
function OnReplaceFilenameLeftToRight(const FileName: UnicodeString;
const isFolder: Boolean):UnicodeString;
begin
if isFolder then
Result:=FileName
else
Result:=ChangeFileExt(FileName,'')+'-draft'+ExtractFileExt(FileName);
end;