Batch import TXT files to 1 MongoDB collection

by

Want to batch import data from TXT files into 1 MongoDB collection?

Using FileToMongo, a native GUI tool, you can batch import data from TXT files into a single MongoDB collection easily and fast, no need to program, just a few mouse clicks!

Support all MongoDB deployment types: standalone, replica set, sharded cluster, and MongoDB Atlas.

Support Windows, Linux, macOS.

Here’s how to.

Import

Please download and install FileToMongo, then run it.

Click “N File To 1 Collection” at task dialog.

Batch Import TXT files data To 1 MongoDB collection - task window

Select the “TXT” file type.

Batch Import TXT files data To 1 MongoDB collection - select file type

1. Open a folder contains TXT files.

Batch Import Data From TXT Files To 1 MongoDB collection - set TXT folder

2. Set TXT options.

Batch Import Data From TXT Files To 1 MongoDB collection - config TXT file

3. Set MongoDB collection options.

Batch Load Data From TXT Files To 1 MongoDB collection - select table

4. Summary.

Batch Transfer Data From TXT Files To 1 MongoDB collection - preview

5. Import data from TXT files to MongoDB collection.

Batch Copy Data From TXT Files To 1 MongoDB collection - import data

After importing, you can view imported data.

Import Data From TXT Files To Single MongoDB Collection - view data

Save/load session

You can save/load session to run “TXT files to MongoDB collection” conversion repeatly.

1.Save Session.

Click “Save Session” button, then enter a session file name.

Import Data From TXT Files To Single MongoDB Collection - save session

click “OK” button.

2.Load Session.

Click the “Open a Saved Session” in task window, select a session file.

Import Data From TXT File To Single MongoDB Collection - load session

then show the wizard form, click a few “Next” to import TXT files to MongoDB collection.

Import Data From TXT Files To Single MongoDB Collection - start session

Run in command line

You can run “TXT files to MongoDB collection” conversion in command line.

When you save session, you can click “Save & Make Batch File”.

Import Data From TXT Files To Single MongoDB Collection - save session

The “Save & Make Batch File” form shows.

Import Data From TXT File To Single MongoDB Collection - create batch file

Click “OK” button, you’ll create a batch file, in Windows, like this:

C:
cd "C:\Users\pansh\AppData\Local\Programs\FileToMongo"
FileToMongo task="C:\Users\pansh\Documents\test.mlm" logfile="C:\Users\pansh\Documents\test.log"

You can run this batch file in command line.

Run as scheduled task

You can run “TXT files to MongoDB collection” conversion automatically at specific time.

On Linux/macOS, you can use Crontab.

For macOS, How to Fix Cron Permission Issues in macOS.

On Windows, in “Save & Make Batch File” form, you can click “Create & Schedule Task” to set a scheduled task.

Import Data From TXT File To Single MongoDB Collection - create batch file

And then, with scheduled task wizard, step by step.

Import Data From TXT File To Single MongoDB Collection - scheduled task application

Import Data From TXT File To Single MongoDB Collection - scheduled task name

Import Data From TXT File To Single MongoDB Collection - scheduled task time

Import Data From TXT File To Single MongoDB Collection - scheduled task user

Import Data From TXT File To Single MongoDB Collection - scheduled task information

You’ll see created task listed in scheduled task list.

scheduled task list

Download

Here you can download FileToMongo, and buy FileToMongo.

Download FileToMongo Download FileToMongo