 




<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to remove specific lines from a text files using either vbs or bat.</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/how-to-remove-specific-lines-from-a-text-files-using-either-vbs-or-bat/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-remove-specific-lines-from-a-text-files-using-either-vbs-or-bat/</link>
	<description></description>
	<lastBuildDate>Thu, 23 May 2013 23:47:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: swinehart6803</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-remove-specific-lines-from-a-text-files-using-either-vbs-or-bat/#comment-83503</link>
		<dc:creator>swinehart6803</dc:creator>
		<pubDate>Tue, 09 Nov 2010 17:02:38 +0000</pubDate>
		<guid isPermaLink="false">#comment-83503</guid>
		<description><![CDATA[Thank Plb

After figuring out the syntax and command line switches it was easy using ssed.
For anyone who comes across a need like this again the code I used is below

======================bat file line=========================

ssed -e 1,8d -e 10,21d -e $d report.csv &gt; C:cleaned_report.csv

======================End of code===========================

The key was to be able to stack the command and delete multiple lines is to use the &quot;-e&quot; switch. And this version does not like to have spaces after the line number or range of numbers, unlike to web examples.
Plus I had trouble running getting it edit files that did not exist in the same folder as the .exe, so I just dumped the files I wanted to edit into the same folder as ssed.exe and ran the it there.]]></description>
		<content:encoded><![CDATA[<p>Thank Plb</p>
<p>After figuring out the syntax and command line switches it was easy using ssed.<br />
For anyone who comes across a need like this again the code I used is below</p>
<p>======================bat file line=========================</p>
<p>ssed -e 1,8d -e 10,21d -e $d report.csv &gt; C:cleaned_report.csv</p>
<p>======================End of code===========================</p>
<p>The key was to be able to stack the command and delete multiple lines is to use the &#8220;-e&#8221; switch. And this version does not like to have spaces after the line number or range of numbers, unlike to web examples.<br />
Plus I had trouble running getting it edit files that did not exist in the same folder as the .exe, so I just dumped the files I wanted to edit into the same folder as ssed.exe and ran the it there.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 6/9 queries in 0.011 seconds using memcached
Object Caching 268/271 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-23 23:52:58 -->