Monday, January 16, 2017
How To Batch Convert Text Files To Other Formats In Mac Via The Terminal
How To Batch Convert Text Files To Other Formats In Mac Via The Terminal
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, ItS A Good Use Of Os XS 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 (DonT Press Enter Yet)
textutil -convert FILEFORMAT
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 ThereS A Space After The File Format, And Then Drag The Document You Want To Convert Into The Terminal Window:
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 YouRe Converting.For Example, In The Command Below, All .Docx Files In The Folder Docs Will Be Converted To .Txt Files:
textutil -convert txt /Users/shujaaimran/Desktop/Docs/*.docx
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.
I Hope This Article Helps You If You Getting Any Problem Related To This Article You Can Comment By Below Comment Box We Will Help You And If You Need Any Trick Or Software Or Hack You Can Mail Us We Will Try To Give That Article We Happy To Help You All Guys.Thank You Share And Subscribe Us. #Pankaj Patidar Rock
Dont Forget To Like And Follow..
Available link for download