Skip to main content

Hello All

I'm new to FME but i think it's a great tool to help

anyway i have this problem that i hope that somebody can help me to solve it

I have a TXT file , most of the sentence are not with dot at the end.

I need to add a dot at the end of every sentence and then save the TXT file back again with the same encoding settings ( I want to make this thing to go automatically)

any help guys

thanks

Use the Text reader with the setting to not read the whole file as one feature:

The use the StringSearcher, searching by \\.$ to check if the line ends with a dot.

If not, use the StringConcatenator to add a dot to the line.

Then use a Text writer to write the text line by line.


firstly thank you very much for your response , but can we do it step by step

I tried the string concatenator but without any luck ( what to write there )


Use the Text reader with the setting to not read the whole file as one feature:

The use the StringSearcher, searching by \\.$ to check if the line ends with a dot.

If not, use the StringConcatenator to add a dot to the line.

Then use a Text writer to write the text line by line.

See image and attached example (FME 2018):

 

 

 

textline2textline.fmwt

 


firstly thank you very much for your response , but can we do it step by step

I tried the string concatenator but without any luck ( what to write there )

I have added a screenshot and a template with the workflow.

 

 


Thanks a lot Erik

another quick thing ,, it only work for certain file or I can use a watch folder for all files


I have added a screenshot and a template with the workflow.

 

 

Thanks a lot Erik

 

 

another quick thing ,, it only work for certain file or I can use a watch folder for all files

 

 

 


Thanks a lot Erik

another quick thing ,, it only work for certain file or I can use a watch folder for all files

You can use this workflow for any text file.

 

I used a log (.LOG) file, because that was the first I found.

 

 


Reply