Remove trailing Spaces from Title field

If you made a script you can offer it to the others here, or ask help to improve it. You can also report here bugs & problems with existing scripts.
Post Reply
Tetsujin
Posts: 13
Joined: 2012-12-09 03:04:40

Remove trailing Spaces from Title field

Post by Tetsujin »

Is removing trailing spaces from the Title field something that I could do with RemoveBadChars.ifs
I imported Titles without checking for trailing spaces first.
antp
Site Admin
Posts: 9629
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

I am not sure if it does, but you could probably just use a simple script like this:

Code: Select all

Program NewScript;
var
  s: string;
begin
  s := GetField(fieldOriginalTitle);
  s := Trim(s);
  SetField(fieldOriginalTitle, s);
end.
(note that it will also remove leading spaces if there are any, but I guess it is not a problem)
Post Reply