Replace text within a text file

Hi there,

is there a way / a module to replace text within a TXT text file in Make?

Regards, Fabian

Hey @Fabian,

There’s no specific module that can do this, but it’s pretty straightforward to get this result in a few steps. Here’s what I did, using Google Drive.

I uploaded a file to my Google Drive called This is some text.txt. Then, I used the ‘Download a File’ module for Google Drive in Make, and selected this file as an input.

Next, I connected a ‘Convert the encoding of a text’ module to it. There, I selected the data response as an input, and ASCII as the output. The codepage can be left empty.

CleanShot 2022-08-04 at 11.34.58

The last step is to connect the ‘Create a File from Text’ module from Google Drive. I can specify a file name, and the file content. I used the output of the previous module, and added some text to it. Of course, you can make this as simple or complicated as you like. I kept it very simple for this example.

And voilà! There’s now a new file added to my Google Drive with the added text.

CleanShot 2022-08-04 at 11.38.06

Hope this was helpful!

1 Like