Sub Combine_CSV_Files
Dim fLocation, sLocation, dLocation, objShell
fLocation = InputBox("please enter the folder location")
If fLocation=vbNullString then
MsgBox "folder not selected...", vbOKOnly + vbInformation, "Task Cancelled"
Wscript.quit
End If
sLocation = fLocation & "\*.csv"
dLocation = fLocation & "\Combined_Data.csv"
Set objShell = CreateObject("WScript.Shell")
objShell.Run "cmd /k Copy """ & sLocation & """ """ & dLocation & """ & exit", False
Set objShell = Nothing
End sub
Call Combine_CSV_Files
*********************************************************************************
Copy the above code and paste into notepad file & save the notepad file with .vbs extension.
' Then click on the saved notepad file.
' it will prompt the folder path where all the CVS files stored.
' copy the folder path and paste into the input box
' all the cvs files has been combined within a second with the file name "Combined_Data.csv
Try this very useful..!
Dim fLocation, sLocation, dLocation, objShell
fLocation = InputBox("please enter the folder location")
If fLocation=vbNullString then
MsgBox "folder not selected...", vbOKOnly + vbInformation, "Task Cancelled"
Wscript.quit
End If
sLocation = fLocation & "\*.csv"
dLocation = fLocation & "\Combined_Data.csv"
Set objShell = CreateObject("WScript.Shell")
objShell.Run "cmd /k Copy """ & sLocation & """ """ & dLocation & """ & exit", False
Set objShell = Nothing
End sub
Call Combine_CSV_Files
*********************************************************************************
Copy the above code and paste into notepad file & save the notepad file with .vbs extension.
' Then click on the saved notepad file.
' it will prompt the folder path where all the CVS files stored.
' copy the folder path and paste into the input box
' all the cvs files has been combined within a second with the file name "Combined_Data.csv
Try this very useful..!
No comments:
Post a Comment