{"id":5815,"date":"2021-11-17T04:42:07","date_gmt":"2021-11-17T04:42:07","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=5815"},"modified":"2021-11-17T04:47:16","modified_gmt":"2021-11-17T04:47:16","slug":"insert-filename-into-first-column-in-csv-file","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/programming\/insert-filename-into-first-column-in-csv-file\/23787.html","title":{"rendered":"Insert Filename Into First Column In CSV File"},"content":{"rendered":"<p>Hi There!<\/p>\n<p>I have many output files (500+).<\/p>\n<p>The file names reflect the username, for example: &#8220;firstname lastname.csv&#8221;<\/p>\n<p>A snapshot of each file is as follows:<\/p>\n<p>Application Name,Description,Version,Vendor,Copyright<br \/>\n&#8221; Crypto 1 Library&#8221;,&#8221;&#8221;,,&#8221;&#8221;,&#8221;&#8221;<\/p>\n<p>Each CSV contains upwards of 100 lines, but essentially follows the above formats.<\/p>\n<p>So I&#8217;m trying to write a batch file that will take my list of files which I have in a text file (filelist.txt), insert the name of the file into each CSV as the first column.<\/p>\n<p>I can them merge them myself and work with the information.<\/p>\n<p>Advice apprecaited!<\/p>\n<p>Thanks in advanced \ud83d\ude42 WM<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":12},"question-category":[55],"question_tags":[],"class_list":["post-5815","question","type-question","status-publish","hentry","question-category-programming"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question\/5815","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question"}],"about":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/comments?post=5815"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=5815"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=5815"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=5815"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}