Compare two TXT using cURL

Powerful cURL command line tool to compare TXT files in PDF, Word, HTML, TXT, MD and other formats

Use cURL command line tool to use our file difference checker, compare two TXT documents and see the differences between them clearly shown in the output. You no longer need to compare your documents manually. Also note that the comparison result can be exported to a DOCX, PDF, DOC and others.

View code snippet

Compare TXT in cURL

Our cURL SDK is designed to give you the most accurate result, even though comparison is a complex function itself.

Sometimes you need to be sure that the document in the TXT format has not been changed, and if it has, you need to find out what the difference is. Just use our cURL diff tool to compare two TXT files and find differences in whole words or single characters. Moreover, if only one character in a word has changed, this word will be marked as changed entirely.

Now you no longer need to spend time manually comparing TXT documents, and you can quickly find even small changes and export such diffs to a document in a convenient format.

Try to compare TXT documents

Check out how our solution to compare TXT files using cURL SDK works. To achieve this, load the TXT files you want to compare and select the export file format – it will be automatically loaded after comparing.

Note that you need to accept all revisions in compared documents before calling the comparison method, as shown in our example:

Upload the compared file
Run code
Upload the second file to compare
Select the target format from the list
//  Upload documents to cloud storage.
curl -v "https://api.aspose.cloud/v4.0/words/storage/file/Input1.txt" \
     -X PUT \
     -H "Content-Type: multipart/form-data" \
     -H "Authorization: Bearer ####################" \
     -F FileContent="@%FileName1%"

curl -v "https://api.aspose.cloud/v4.0/words/storage/file/Input2.txt" \
     -X PUT \
     -H "Content-Type: multipart/form-data" \
     -H "Authorization: Bearer ####################" \
     -F FileContent="@%FileName2%"

//  Compare documents in cloud.
curl -v "https://api.aspose.cloud/v4.0/words/Input1.txt/compareDocument?destFileName=Output.txt" \
     -X PUT \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer ####################" \
     -d "{\"Author\":\"author\",\"ComparingWithDocument\":\"Input2.txt\"}"

//  Download result document from cloud storage.
curl -v "https://api.aspose.cloud/v4.0/words/storage/file/Output.txt" \
     -X GET \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer ####################" \
Run code
  
Copy cURL code to the clipboard

How to Compare two versions of a file

  1. Install cURL
  2. Get your app keys to use Aspose.Words Cloud for cURL
  3. Pass the Bearer token in the Authorization header
  4. Load two TXT documents to compare
  5. Call the /compareDocument method to compare TXT docs
  6. Download the result document from the cloud storage

cURL library to use compare

Download and install the curl utility. Please follow these Instructions to quickly get the necessary security credentials and access our REST API.

System Requirements

There are no special requirements for using this tool.

Other supported file formats

You can perform compare operation for other file formats:

5%

Subscribe to Aspose Product Updates

Get monthly newsletters and offers directly delivered to your mailbox.

© Aspose Pty Ltd 2001-2024. All Rights Reserved.