On Wed, Jun 18, 2014 at 2:36 PM, Bart <bartjunk64 at gmail.com> wrote: > The original code removes trailing spaces only, and Trim() removes > more than spaces (and it removes leading blanks as well). Filename := TrimRight(Filename); :) Juha