{"id":3654,"date":"2012-11-03T01:11:23","date_gmt":"2012-11-03T05:11:23","guid":{"rendered":"http:\/\/elwinlee.com\/blog\/?p=3654"},"modified":"2014-11-06T16:27:25","modified_gmt":"2014-11-06T21:27:25","slug":"how-combine-text-files-into-one-file","status":"publish","type":"post","link":"https:\/\/www.elwinlee.com\/blog\/how-combine-text-files-into-one-file\/","title":{"rendered":"[How] Combine Text Files Into One File"},"content":{"rendered":"<p>I was trying to import data into Excel the other day, when I noticed that Excel only allows me to import 1 text file at a time. Because I&#8217;m too lazy to import them 1 by 1, I found this command line on how to combine data from multiple text files into a single file \ud83d\ude00 <\/p>\n<p><a href=\"http:\/\/elwinlee.com\/blog\/wp-content\/uploads\/2012\/11\/cmd_copy.png\" data-rel=\"lightbox-image-0\" data-rl_title=\"\" data-rl_caption=\"\"><img decoding=\"async\" src=\"http:\/\/elwinlee.com\/blog\/wp-content\/uploads\/2012\/11\/cmd_copy.png\" alt=\"\" title=\"\" width=\"476\" height=\"263\" class=\"aligncenter size-full wp-image-3655\" srcset=\"https:\/\/www.elwinlee.com\/blog\/wp-content\/uploads\/2012\/11\/cmd_copy.png 476w, https:\/\/www.elwinlee.com\/blog\/wp-content\/uploads\/2012\/11\/cmd_copy-300x166.png 300w\" sizes=\"(max-width: 476px) 100vw, 476px\" \/><\/a><\/p>\n<p>Lets say you have four text files a.txt, b.txt, c.txt and d.txt and you want to merge the contents of all the text files into one target.txt. To merge text files open the MS DOS command prompt and change the directory to where all files are stored. Now issue command : copy *.txt target.txt<\/p>\n<p>This will merge all the text files in the directory and create a new file named target.txt<\/p>\n<p><em>Source: <a href=\"http:\/\/www.thetechhub.com\/2010\/04\/combine-text-files-into-one-with-single.html\">http:\/\/www.thetechhub.com\/2010\/04\/combine-text-files-into-one-with-single.html<\/a><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was trying to import data into Excel the other day, when I noticed that Excel only allows me to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3655,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rs_blank_template":"","rs_page_bg_color":"","slide_template_v7":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1079],"tags":[991,1898,2204,2205,2206,2207,2208,2209,2210,2211,2212],"class_list":["post-3654","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to-fix-stuff","tag-files","tag-text","tag-combine","tag-multiple","tag-single","tag-command","tag-line","tag-cmd","tag-msdos","tag-copy","tag-txt"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"description\" content=\"Combine multiple text files into a single file using command line\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Elwin Lee\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.elwinlee.com\/blog\/how-combine-text-files-into-one-file\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Elwin Lee&#039;s Blog | Design, Technology &amp; Food!\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"[How] Combine Text Files Into One File | Elwin Lee&#039;s Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"Combine multiple text files into a single file using command line\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.elwinlee.com\/blog\/how-combine-text-files-into-one-file\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2012-11-03T05:11:23+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2014-11-06T21:27:25+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"[How] Combine Text Files Into One File | Elwin Lee&#039;s Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Combine multiple text files into a single file using command line\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/how-combine-text-files-into-one-file\\\/#article\",\"name\":\"[How] Combine Text Files Into One File | Elwin Lee's Blog\",\"headline\":\"[How] Combine Text Files Into One File\",\"author\":{\"@id\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/wp-content\\\/uploads\\\/2012\\\/11\\\/cmd_copy.png\",\"width\":476,\"height\":263},\"datePublished\":\"2012-11-03T01:11:23+01:00\",\"dateModified\":\"2014-11-06T16:27:25+01:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/how-combine-text-files-into-one-file\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/how-combine-text-files-into-one-file\\\/#webpage\"},\"articleSection\":\"How to fix stuff, files, text, combine, multiple, single, command, line, cmd, msdos, copy, txt\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/how-combine-text-files-into-one-file\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.elwinlee.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/category\\\/how-to-fix-stuff\\\/#listItem\",\"name\":\"How to fix stuff\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/category\\\/how-to-fix-stuff\\\/#listItem\",\"position\":2,\"name\":\"How to fix stuff\",\"item\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/category\\\/how-to-fix-stuff\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/how-combine-text-files-into-one-file\\\/#listItem\",\"name\":\"[How] Combine Text Files Into One File\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.elwinlee.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/how-combine-text-files-into-one-file\\\/#listItem\",\"position\":3,\"name\":\"[How] Combine Text Files Into One File\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/category\\\/how-to-fix-stuff\\\/#listItem\",\"name\":\"How to fix stuff\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/#organization\",\"name\":\"Elwin Lee's Blog\",\"description\":\"Design, Technology & Food!\",\"url\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/author\\\/admin\\\/#author\",\"url\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/author\\\/admin\\\/\",\"name\":\"Elwin Lee\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/how-combine-text-files-into-one-file\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/edf9391c53506d1261906c54cfca9e7a3b39f0e86f12164205875fa57004efef?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Elwin Lee\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/how-combine-text-files-into-one-file\\\/#webpage\",\"url\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/how-combine-text-files-into-one-file\\\/\",\"name\":\"[How] Combine Text Files Into One File | Elwin Lee's Blog\",\"description\":\"Combine multiple text files into a single file using command line\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/how-combine-text-files-into-one-file\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/wp-content\\\/uploads\\\/2012\\\/11\\\/cmd_copy.png\",\"@id\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/how-combine-text-files-into-one-file\\\/#mainImage\",\"width\":476,\"height\":263},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/how-combine-text-files-into-one-file\\\/#mainImage\"},\"datePublished\":\"2012-11-03T01:11:23+01:00\",\"dateModified\":\"2014-11-06T16:27:25+01:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/\",\"name\":\"Elwin Lee's Blog\",\"description\":\"Design, Technology & Food!\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.elwinlee.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"[How] Combine Text Files Into One File | Elwin Lee's Blog","description":"Combine multiple text files into a single file using command line","canonical_url":"https:\/\/www.elwinlee.com\/blog\/how-combine-text-files-into-one-file\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.elwinlee.com\/blog\/how-combine-text-files-into-one-file\/#article","name":"[How] Combine Text Files Into One File | Elwin Lee's Blog","headline":"[How] Combine Text Files Into One File","author":{"@id":"https:\/\/www.elwinlee.com\/blog\/author\/admin\/#author"},"publisher":{"@id":"https:\/\/www.elwinlee.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/www.elwinlee.com\/blog\/wp-content\/uploads\/2012\/11\/cmd_copy.png","width":476,"height":263},"datePublished":"2012-11-03T01:11:23+01:00","dateModified":"2014-11-06T16:27:25+01:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.elwinlee.com\/blog\/how-combine-text-files-into-one-file\/#webpage"},"isPartOf":{"@id":"https:\/\/www.elwinlee.com\/blog\/how-combine-text-files-into-one-file\/#webpage"},"articleSection":"How to fix stuff, files, text, combine, multiple, single, command, line, cmd, msdos, copy, txt"},{"@type":"BreadcrumbList","@id":"https:\/\/www.elwinlee.com\/blog\/how-combine-text-files-into-one-file\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.elwinlee.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.elwinlee.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.elwinlee.com\/blog\/category\/how-to-fix-stuff\/#listItem","name":"How to fix stuff"}},{"@type":"ListItem","@id":"https:\/\/www.elwinlee.com\/blog\/category\/how-to-fix-stuff\/#listItem","position":2,"name":"How to fix stuff","item":"https:\/\/www.elwinlee.com\/blog\/category\/how-to-fix-stuff\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.elwinlee.com\/blog\/how-combine-text-files-into-one-file\/#listItem","name":"[How] Combine Text Files Into One File"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.elwinlee.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.elwinlee.com\/blog\/how-combine-text-files-into-one-file\/#listItem","position":3,"name":"[How] Combine Text Files Into One File","previousItem":{"@type":"ListItem","@id":"https:\/\/www.elwinlee.com\/blog\/category\/how-to-fix-stuff\/#listItem","name":"How to fix stuff"}}]},{"@type":"Organization","@id":"https:\/\/www.elwinlee.com\/blog\/#organization","name":"Elwin Lee's Blog","description":"Design, Technology & Food!","url":"https:\/\/www.elwinlee.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.elwinlee.com\/blog\/author\/admin\/#author","url":"https:\/\/www.elwinlee.com\/blog\/author\/admin\/","name":"Elwin Lee","image":{"@type":"ImageObject","@id":"https:\/\/www.elwinlee.com\/blog\/how-combine-text-files-into-one-file\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/edf9391c53506d1261906c54cfca9e7a3b39f0e86f12164205875fa57004efef?s=96&d=mm&r=g","width":96,"height":96,"caption":"Elwin Lee"}},{"@type":"WebPage","@id":"https:\/\/www.elwinlee.com\/blog\/how-combine-text-files-into-one-file\/#webpage","url":"https:\/\/www.elwinlee.com\/blog\/how-combine-text-files-into-one-file\/","name":"[How] Combine Text Files Into One File | Elwin Lee's Blog","description":"Combine multiple text files into a single file using command line","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.elwinlee.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.elwinlee.com\/blog\/how-combine-text-files-into-one-file\/#breadcrumblist"},"author":{"@id":"https:\/\/www.elwinlee.com\/blog\/author\/admin\/#author"},"creator":{"@id":"https:\/\/www.elwinlee.com\/blog\/author\/admin\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/www.elwinlee.com\/blog\/wp-content\/uploads\/2012\/11\/cmd_copy.png","@id":"https:\/\/www.elwinlee.com\/blog\/how-combine-text-files-into-one-file\/#mainImage","width":476,"height":263},"primaryImageOfPage":{"@id":"https:\/\/www.elwinlee.com\/blog\/how-combine-text-files-into-one-file\/#mainImage"},"datePublished":"2012-11-03T01:11:23+01:00","dateModified":"2014-11-06T16:27:25+01:00"},{"@type":"WebSite","@id":"https:\/\/www.elwinlee.com\/blog\/#website","url":"https:\/\/www.elwinlee.com\/blog\/","name":"Elwin Lee's Blog","description":"Design, Technology & Food!","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.elwinlee.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Elwin Lee's Blog | Design, Technology &amp; Food!","og:type":"article","og:title":"[How] Combine Text Files Into One File | Elwin Lee's Blog","og:description":"Combine multiple text files into a single file using command line","og:url":"https:\/\/www.elwinlee.com\/blog\/how-combine-text-files-into-one-file\/","article:published_time":"2012-11-03T05:11:23+00:00","article:modified_time":"2014-11-06T21:27:25+00:00","twitter:card":"summary","twitter:title":"[How] Combine Text Files Into One File | Elwin Lee's Blog","twitter:description":"Combine multiple text files into a single file using command line"},"aioseo_meta_data":{"post_id":"3654","title":"[How] Combine Text Files Into One File | #site_title","description":"Combine multiple text files into a single file using command line","keywords":[{"label":"text","value":"text"},{"label":"files","value":"files"},{"label":"combine","value":"combine"},{"label":"multiple","value":"multiple"},{"label":"single","value":"single"},{"label":"command","value":"command"},{"label":"line","value":"line"},{"label":"cmd","value":"cmd"},{"label":"msdos","value":"msdos"},{"label":"copy","value":"copy"},{"label":"txt","value":"txt"}],"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[],"defaultGraph":"","defaultPostTypeGraph":""},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-01-08 01:32:40","updated":"2025-12-12 01:47:31","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.elwinlee.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.elwinlee.com\/blog\/category\/how-to-fix-stuff\/\" title=\"How to fix stuff\">How to fix stuff<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t[How] Combine Text Files Into One File\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.elwinlee.com\/blog"},{"label":"How to fix stuff","link":"https:\/\/www.elwinlee.com\/blog\/category\/how-to-fix-stuff\/"},{"label":"[How] Combine Text Files Into One File","link":"https:\/\/www.elwinlee.com\/blog\/how-combine-text-files-into-one-file\/"}],"jetpack_featured_media_url":"https:\/\/www.elwinlee.com\/blog\/wp-content\/uploads\/2012\/11\/cmd_copy.png","jetpack_shortlink":"https:\/\/wp.me\/p1mtRf-WW","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.elwinlee.com\/blog\/wp-json\/wp\/v2\/posts\/3654","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.elwinlee.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.elwinlee.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.elwinlee.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.elwinlee.com\/blog\/wp-json\/wp\/v2\/comments?post=3654"}],"version-history":[{"count":2,"href":"https:\/\/www.elwinlee.com\/blog\/wp-json\/wp\/v2\/posts\/3654\/revisions"}],"predecessor-version":[{"id":3660,"href":"https:\/\/www.elwinlee.com\/blog\/wp-json\/wp\/v2\/posts\/3654\/revisions\/3660"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.elwinlee.com\/blog\/wp-json\/wp\/v2\/media\/3655"}],"wp:attachment":[{"href":"https:\/\/www.elwinlee.com\/blog\/wp-json\/wp\/v2\/media?parent=3654"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.elwinlee.com\/blog\/wp-json\/wp\/v2\/categories?post=3654"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.elwinlee.com\/blog\/wp-json\/wp\/v2\/tags?post=3654"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}