Error coping files with % in names from WD NAS to Qnap NAS
Posted: Thu Feb 13, 2025 9:31 pm
Files are not copied from left to right from WD NAS to Qnap containing % in their names. I am attaching screenshots with the result. I tried the Pascal script below but it did not help.
function OnReplaceFilenameLeftToRight(const FileName: UnicodeString;
const isFolder: Boolean): UnicodeString;
var
i: Integer;
w: WideChar;
begin
Result := FileName;
// Check is not folder just file
if not isFolder then
begin
for i := 1 to Length(Result) do
begin
w := Result;
if Ord(w) < 127 then
case w of
'%': Result := '-';
end;
end;
end;
end;
function OnReplaceFilenameLeftToRight(const FileName: UnicodeString;
const isFolder: Boolean): UnicodeString;
var
i: Integer;
w: WideChar;
begin
Result := FileName;
// Check is not folder just file
if not isFolder then
begin
for i := 1 to Length(Result) do
begin
w := Result;
if Ord(w) < 127 then
case w of
'%': Result := '-';
end;
end;
end;
end;