Text Files For Mac

  1. Text File Formatter
  2. Search Text Files For String

Text documents could be created for different useful purposes as for audio notes, tutorials, lectures, etc…..
Mac has a very powerful text to speech engine that could be accessed easily through the Terminal command line. So, here we tell you about a Terminal command “Say”, by which you can easily create audio from text file. You’ll also learn in following that in which ways you can use this command.

Step 1

Run Finder

This can come in handy if you're creating captions for a YouTube video or writing some kind of computer code that requires plain text files. Shop at Amazon using this link to support this channel.

Advertisement

Step 2

Click on Applications and then on Utilities folder, here you will find Terminal

Step 3

Run Terminal and type the following command and hit Enter.
cd ~/Desktop
This command will set the location to desktop

Step 4

Say “……….”

Now type in double codes your text string with Say command as following and your Mac will read this string in loud voice
Say “trickyways digital life tips and tricks”

Step 5

Say -v

You can select different voices from your Mac to read the text as Alex, Bruce, Fred, Kathy, Vicki, Victoria. So, if you want to change a voice then type the following command and press Enter.
Say -v Alex “trickyways digital life tips and tricks”

Step 6

Say -f “filename.rtf”

You can also provide a text file to Mac to read, to do so, type following command in Terminal and press Enter
Say -v Alex -f “trickyways.rtf”

Step 7

Say -o “audiofile.aiff” -f “textfile.rtf”

You can also provide a text file to Mac to read and save it as an audio file on your system. To do that type the following command and press Enter.
Say -v Alex -o “audio.aiff” -f “trickyways.rtf”

You can apply more than one switch with the same command as we did in Step 7.

Text Files For Mac

Related Content

A lot of you might have different methods to convert a text document into another format. The simplest method for some of you will be to open the text document in a simple editor such as TextEdit, and then export it as another format. Another method could be to open the file in Microsoft Word and save it as a Rich Text or Plain Text document.

One method that you might not know about is using a command in Terminal to convert files from one format to another. While this method might not suit all of you, it’s a good use of OS X’s command line.

The command that can be used for this is the textutil command, which can be used to convert a document to a specified format.

1. Open Terminal on your Mac either by Spotlight or by navigating to “Applications -> Utilities”.

2. Type in the following command into Terminal (don’t press Enter yet):

Here, replace FILEFORMAT with any of the following formats into which you want to convert your file into:

  • txt
  • html
  • rtf
  • rtfd
  • doc
  • docx
  • wordml
  • odt
  • webarchive

3. Press the space bar on your Mac and ensure there’s a space after the file format, and then drag the document you want to convert into the Terminal window:

Once done, the total command will look something like this, depending on the file name and file location:

Once you execute this command, the new (converted) file will appear in the same folder as the original.

Batch convert text files to other formats

A good use of this command is to batch convert text documents into another format. To do this, instead of dragging a specific file, drag a complete folder to the Terminal window. Then, after the folder path, simply add a forward slash to the end of the folder path (ensure that there is no space between the path and the forward slash) ‘/’, followed by “*.FORMAT”. Replace FORMAT with the original file format, which you’re converting.

For example, in the command below, all .docx files in the folder “Docs” will be converted to .txt files:

The resulting converted files will be located in the same location as the original.

And for those of you who prefer not to use such commands, a quick way to strip text of all formatting is to paste it into Terminal, and then copy it back to the desired format you want to paste it in.

How to create a text file

Conclusion

Text File Formatter

Using Terminal to quickly batch convert documents is a simple and cost-effective measure, which you can take advantage of without downloading any other third-party applications. While some of you will prefer to use simple text editors such as TextEdit for this, many of you will like this use of Terminal and take full advantage of it. Just remember, don’t mess up the commands, as messing around in Terminal has proved to be disastrous for many in the past.

Search Text Files For String

Be sure to let us know in the comments below which text editor you prefer to convert documents from one format to another. Also, let us know whether the above methods worked for you or not.