Overview

 

The Convert Multiple Text Files To CSV Files Software is a convenient method to convert one or many text files into CSV (comma-separated) files.  The user may choose to change spaces, tabs, carriage returns or any user-specified ASCII characters to commas or comma-spaces.  The software is very easy to use.  The user simply picks one or more Text file to convert, selects the desired option and then presses the “Start Converting” button.  This starts the conversion process of all of the selected Text files into CSV files.

 

This software may be used either from the Main Window, or at the command line.

 

Main Screen

 

If the user prefers to use the Convert Multiple Text Files To CSV Files Software as a Window’s application it can be started by double clicking the icon on the user’s desktop or choosing it from the Start Menu.  The Main Screen is divided into sections.  The top displays the Text files that will be converted to CSV files. Directly below is an area to set conversion options.  Below that, a section contains buttons to add files to the Text file list, perform a conversion and display help.  A progress bar is at the bottom.  This bar displays the progress during a conversion.  The Main Screen is displayed below:

 

 

In addition to the Main Screen, if you are using the free version of the software an additional window is displayed.  This window offer you links to “Buy Now”, “Enter License”, “Support” and “sobolsoft.com”.

 

The “Buy Now” link will use your default internet browser to display a page that will allow you to purchase the software and receive a License.  The license may be entered into the dialog that is displayed when you choose the “Enter License” link.  The “Support” link uses your default browser to display a list of frequently asked questions at https://sobolsoft.com/question/ and the “sobolsoft.com” link will bring you directly to the Sobolsoft website at www.sobolsoft.com.

 

Once a license has been entered in the “Enter License” window this window is no longer available but all of the information is still available at the sources listed above.

 

Executing from the Command Line

 

The user has the option to execute the Convert Multiple Text Files To CSV Files Software on the command line.  To do so, use the following syntax:

 

            converttextcsv <Input File> <Output File> “<Character(s)>” <Options>

 

where

 

            <Input File>:  Full path and name of the Text file to be converted to CSV.

            <Output File>:  Full path and name of the converted CSV file.

            <Character(s)>:  One of the following in quotes

                                                TABS

                                                ENTERS

                                                Any other separation character or characters

            <Options>:  One of the following:

                                                -c

                                                -cs

 

-c:  Replace each occurrence of <Character(s)> with a comma

-cs:  Replace each occurrence of <Character(s)> with a comma/space combination

 

For example to replace each tab character in a file called testfile.txt in the root directory of C: with a comma and output to a file called output.csv also in the root directory of C: the user would use the following command line:

 

            converttextcsv c:\testfile.txt c:\output.csv “TABS” –c

 

Adding Text Files

 

Text files may be added one by one or multiple at a time.  As each file or group of files is selected, they are displayed in the Text File list at the top of the Main Screen.  To select individual files from a folder the user may press the “Add File(s)” button.  To select all of the Text files in a folder the user may select the “Add All Files In Folder” button.

 

Adding Text Files From a Folder

 

To Add Individual File(s) from a folder the user would press the “Add File(s)” button on the Main Screen.  Pressing this button will bring up the Add File(s) dialog displayed below:

 

 

 To select a single Text file, navigate to the folder containing the Text files and single click on the desired file.  Multiple Text files may be selected by holding down the CTRL key on the keyboard and simultaneously single clicking on additional files.  A range of files may be selected by clicking on the first file in the range and then holding down the SHIFT key on the keyboard while clicking on the last file in the range.

 

When the desired files have been selected, press the “Open” button to exit the dialog and copy the selected files to the Text file list on the Main Screen.  To exit the dialog without selecting any files, press the “Cancel” button.

 

Adding All Text Files From a Folder

 

For the user’s convenience, all the Text files in a given folder may be selected simultaneously and written to the Text file list on the Main Window.  To do this, press the “Add All File(s) In Folder” button.  This will bring up the Browse for Folder dialog shown below:

 

 

Select the Folder that contains the Text files to be converted.  Press the “OK” button to exit the dialog and have all of the Text files from the selected folder copied into the Text file list on the Main Screen.  To exit the dialog without selecting any folder, simply press the “Cancel” button.

 

Conversion Options

 

Before converting files from text to CSV the user should select the proper conversion option.  These are displayed in the Options drop down as shown below:

 

 

The choices are:

 

Tabs To Commas

Spaces To Commas

Enters To Commas

X Character(s) To Commas

Tabs To Comma-spaces

Spaces To Comma-spaces

Enters To Comma-spaces

X Character(s) To Comma-spaces

 

These represent what character(s) in the source Text file will be replaced with what character(s) in the converted CSV file.  The user should select the one that fits their requirements.

 

For example, if the user has a Text file that contains records with fields separated by Tab characters, then they would select either “Tabs To Commas” or “Tabs To Comma-spaces”.  Which one of these two that they select depends on the format desired in the converted CSV file.  If the user would like the fields to be separated by commas in the converted CSV file then they would select “Tabs to Commas”.  Similarly, if the user would like the fields to be separated by a comma/space combination in the converted CSV file then they would select “Tabs to Comma-spaces”.

 

If the fields in the source Text file are separated by more than one character, or that separation character is not a Tab, Space, or Enter, then the user should select either X Character(s) To Commas or X Character(s) To Comma spaces.  If either of those options ore selected, the user will be prompted with the following when they press the “Start Converting” button:

 

 

This dialog allows the user to specify exactly what the separation character(s) are.  Simply type them into the “Enter X” edit box and press OK.

 

Starting the Conversion

 

To begin the conversion of all of the selected Text files to CSV format, press the “Start Converting” button.  This will begin the conversion process.  While the files are being processed the progress is displayed at the bottom of the Main Screen.  When the process is complete, the following dialog is displayed:

 

 

This screen indicates that the files have been processed and that converted files have been written to the same directory as the source files.  The name of the converted files will be the same as the source files except the extension will be .csv.  For example if the source was data.txt, the result of the conversion will produce a data.csv.