Extreme Logic
Software Release 2
                    "We can make this world a better place"

[Program name] 
    txt2csv 1.0

[Description]
    converts text files to comma separated values (CSV). 
    commonly used as input in database applications. It uses
    another mask file(txt2csv.msk as guide on where to put 
    the comma. it can also quote data using the '"' symbol. 
    multiple file input is accepted.  

[portabilty]
    runs in DOS mode, can be executed from windows also via
    ms-dos prompt.

[execution]
    c:\txt2csv file.txt
         or
    c:\txt2csv file1.txt file2.txt and so on...

[output]
    output is displayed on screen once executed. if you wish to
    save it on file, redirect it as shown below

    c:\txt2csv > output.csv
          or
    c:\txt2csv >> output.csv

    whats the difference? the first one overwrites any existing
    output.csv the second one appends.

[text file input]    
    all input should be in text as shown below. and please note that
    the file columns should be limited to 80 characters.

    sample 1

12345678901234567890123456789012345678901234567890123456789012345678901234567890
              
[txt2csv.msk]
    the line below is a sample entry in the file.

    sample 2

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

    one may modify this pattern by replacing the 'x' character by a ',' comma.
    as shown below.

    sample 3

xxxx,,xxx,xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

    by replacing the 'x' to ',' it simply means that after the 5th, 6th and
    10th character a comma should be placed. so using the data as in sample 1
    the output would be..

    
12345,6,7890,1234567890123456789012345678901234567890123456789012345678901234567890

    does it makes sense? i hope so.. again by replacing the 'x' character with
    's' one could enclose the output with a double quote (")

    sample 4

xxxx,,xxx,ssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

    the resulting output would be..

12345,6,7890,"12",34567890123456789012345678901234567890123456789012345678901234567890

    note that a comma is automatically added.

    another special character that can be used is the 'S' (big S). again
    modifying the txt2csv.msk to..

    sample 5

xxxx,,xxx,ssSSxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

    output would be..

12345,6,7890,"12","3","4",567890123456789012345678901234567890123456789012345678901234567890

    by replacing 'x' with a blank(spaced) text data on that appropriate position will
    not be shown.

    sample 6     
    
xxxx  xxx     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

    output would be..
    
1234  789     567890123456789012345678901234567890123456789012345678901234567890

so thats it! if you want to add some features, report some bugs, you can contact
me by mail at virgilio_so_jr@hotmail.com or jan_so@edsamail.com.ph
