Monday, September 27, 2010

How to merge all files into one file using DOS command




Please visit my new Web Site https://coderstechzone.com



Some days ago one of my friend ask me a problem that he needs to import csv file to a SQL Server database. But the problem is there is a huge number of small files. He does not want to import one by one. He needs to merge or together all files in a single file so that he can import using SQL Server import wizard only one file. Since it was a one time job for reconcilation, I suggest him use a DOS command to merge all files into a single or one file. The DOS command is given below:










For example, you can join file1.txt and file2.txt to a new file named file3.txt:
copy/b file1.txt +file2.txt file3.txt
OR:
copy/b *.txt newfilename.txt
OR for all files in a folder:
copy/b * "newfilename_with_path"

0 comments:

Want to say something?
I WOULD BE DELIGHTED TO HEAR FROM YOU

Want To Search More?
Google Search on Internet
Subscribe RSS Subscribe RSS
Article Categories
  • Asp.net
  • Gridview
  • Javascript
  • AJAX
  • Sql server
  • XML
  • CSS
  • Free Web Site Templates
  • Free Desktop Wallpapers
  • TopOfBlogs
     
    Free ASP.NET articles,C#.NET,VB.NET tutorials and Examples,Ajax,SQL Server,Javascript,Jquery,XML,GridView Articles and code examples -- by Shawpnendu Bikash