Results 1 to 2 of 2

Thread: How to combined multiple csv files into new csv file using DOS command?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2015
    Posts
    75

    Post How to combined multiple csv files into new csv file using DOS command?

    In DOS Command I can combined multiple .csv file using this code.
    Code:
    COPY *.csv NewCSVFile.csv
    Name:  copy.jpg
Views: 356
Size:  19.6 KB
    I just write some code bt i dont know how to execute above command inside vb.net

    Code:
    Imports System.Windows.Forms
    Imports System.IO
    Public Class CombineCSV
        Private Sub btnBrowse_Click(sender As Object, e As EventArgs) Handles btnBrowse.Click
            If (LocateCSVFolder.ShowDialog() = DialogResult.OK) Then
                txtLocateCSV.Text = LocateCSVFolder.SelectedPath
            End If
        End Sub
    
        Private Sub btnNewCSVLocation_Click(sender As Object, e As EventArgs) Handles btnNewCSVLocation.Click
            If (LocateCSVFolder.ShowDialog() = Windows.Forms.DialogResult.OK) Then
                txtNewCSVLocation.Text = LocateCSVFolder.SelectedPath
            End If
        End Sub
    
        Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
            Dim xLocation As String
            Dim xNewLocation As String
            Dim xNewFileName As String
    
            xLocation = txtLocateCSV.Text 'Directory of csv files
            xNewLocation = txtNewCSVLocation.Text 'Directory of combined CSV
            xNewFileName = txtNewCSV.Text 'New Filename for combined csv ex. School_Details.csv
    
            'in dos i can do 
            'copy xlocation\*.csv xNewlocation\xNewfileName
    
        End Sub
    
    
    End Class
    Thanks for your time.

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Jun 2015
    Posts
    75

    Re: How to combined multiple csv files into new csv file using DOS command?

    any idea bout how its done?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width