How do I replace the third character in a string?

Hi,

I want to replace the third character in _Filename with ' '.
How do I do it?

Thanks a lot,
David

create a format tag field action:
format %_filename% with
$left(%_filename%,2) $mid(%_filename%,3,$len(%_filename%))

(the blank between the 2 $-commands is your inserted blank).

Hi,

Thanks for your reply.
Maybe I did something wrong, but that just added a blank to the left of the third character.
i.e. if filename is 12a4, it's now 12 a4.
Here's what I did:

  1. Created a new action.
  2. Action type: Format Value.
  3. Field: _FILENAME.
  4. Format string: $left(%_filename%,2) $mid(%_filename%,3,$len(%_filename%))

Is that what you meant?

Thanks,
David

Basically that's right.
Now you may experiment a little with the second part and move the starting point of the "middle string" more to the right:
Format string: $left(%_filename%,2) $mid(%_filename%,4,$len(%_filename%))

I'm not really sure I understand but it works :stuck_out_tongue:
Thanks a lot! :music: