function FilterFilename(const filename: string):string; var i,len: byte; c: string; begin len := length(filename); result := ''; for i := 1 to len do begin c := copy(filename,i,1); if (c='\') or (c='/') or (c=':') or (c='*') or (c='?') or (c='"') or (c='<') or (c='>') or (c='|') then result := result + '_' else result := result + c; end; end;