AW: Howto delete a line in a file?

"Stefan Lubitz" <[email protected]> Wed, 20 Feb 2008 16:09:19 +0100
Newsgroups gmane.comp.windows.autoit.user
Message-ID <000801c873d2$91626410$2302a8c0@bluesbrother>
--qjxTQMJ4FeGMJe6RsVRAKRr-Mp3bCGRESMqkf5f
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

something else:
=20
_FileWriteToLine=20
Remarks

If _FileWriteToLine is called with $fOverWrite as 1 and $sText as "", it
will delete the line.
=20
Rgs,
Stefan

  _____=20=20

Von: [email protected] [mailto:[email protected]] Im
Auftrag von L=FCth, Carsten
Gesendet: Mittwoch, 20. Februar 2008 15:44
An: [email protected]
Betreff: [AutoIt] Howto delete a line in a file?



Hello autoit friends!

Howto delete a line in a file?
I need a solution like e.g. FileDelLine ( filehandle or "filename", "line" =
)

Any idea how to realize?

Mit freundlichem Gru=DF / With kind regards=20

Fielmann AG=20

Carsten L=FCth
IT - Desktop Services
Weidestra=DFe 118a
22083 Hamburg
Telefon: +49 - (0) 40 - 2 70 76 - 199
mailto:c.lueth@fielmann. <mailto:c.lueth%40fielmann.com> com=20

__________________________________________

Fielmann Aktiengesellschaft - Sitz der Gesellschaft: Hamburg -
HRB 56098 - Aufsichtsratsvorsitzender: Prof. Dr. Mark K. Binz -
Vorstand: G=FCnther Fielmann (Vors.), G=FCnter Schmid,=20
Georg Alexander Zeiss, Dr. Stefan Thies

[Non-text portions of this message have been removed]



=20


[Non-text portions of this message have been removed]


--qjxTQMJ4FeGMJe6RsVRAKRr-Mp3bCGRESMqkf5f
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/htm=
l4/strict.dtd">
<html>
<head>
</head>




<body style=3D"background-color: #ffffff;">

<!--~-|**|PrettyHtmlStartT|**|-~-->
<div id=3D"ygrp-mlmsg" style=3D"width:655px; position:relative;">
  <div id=3D"ygrp-msg" style=3D"width: 490px; padding: 0 15px 0 0; float:le=
ft;  z-index:1;">
<!--~-|**|PrettyHtmlEndT|**|-~-->

    <div id=3D"ygrp-text">
            <p>something else:<br>
 <br>
_FileWriteToLine <br>
Remarks<br>
<br>
If _FileWriteToLine is called with $fOverWrite as 1 and $sText as &quot;&qu=
ot;, it<br>
will delete the line.<br>
 <br>
Rgs,<br>
Stefan<br>
<br>
_____  <br>
<br>
Von: <a href=3D"mailto:AutoItList%40yahoogroups.com">AutoItList@yahoogro<wb=
r>ups.com</a> [mailto:<a href=3D"mailto:AutoItList%40yahoogroups.com">AutoI=
tList@yahoogro<wbr>ups.com</a>] Im<br>
Auftrag von L=FCth, Carsten<br>
Gesendet: Mittwoch, 20. Februar 2008 15:44<br>
An: <a href=3D"mailto:AutoItList%40yahoogroups.com">AutoItList@yahoogro<wbr=
>ups.com</a><br>
Betreff: [AutoIt] Howto delete a line in a file?<br>
<br>
Hello autoit friends!<br>
<br>
Howto delete a line in a file?<br>
I need a solution like e.g. FileDelLine ( filehandle or &quot;filename&quot=
;, &quot;line&quot; )<br>
<br>
Any idea how to realize?<br>
<br>
Mit freundlichem Gru=DF / With kind regards <br>
<br>
Fielmann AG <br>
<br>
Carsten L=FCth<br>
IT - Desktop Services<br>
Weidestra=DFe 118a<br>
22083 Hamburg<br>
Telefon: &#43;49 - (0) 40 - 2 70 76 - 199<br>
mailto:c.lueth@<wbr>fielmann. &lt;mailto:c.lueth%<wbr>40fielmann.<wbr>com&g=
t; com <br>
<br>
____________<wbr>_________<wbr>_________<wbr>_________<wbr>___<br>
<br>
Fielmann Aktiengesellschaft - Sitz der Gesellschaft: Hamburg -<br>
HRB 56098 - Aufsichtsratsvorsit<wbr>zender: Prof. Dr. Mark K. Binz -<br>
Vorstand: G=FCnther Fielmann (Vors.), G=FCnter Schmid, <br>
Georg Alexander Zeiss, Dr. Stefan Thies<br>
<br>
[Non-text portions of this message have been removed]<br>
<br>
[Non-text portions of this message have been removed]<br>
<br>
</p>
    </div>=20=20

    <!--~-|**|PrettyHtmlStart|**|-~-->
    <span width=3D"1" style=3D"color: white;">__._,_.___</span>
    <!-- Start the section with Message In topic -->
    <div id=3D"ygrp-actbar">
              <span class=3D"left">
          <a href=3D"http://groups.yahoo.com/group/AutoItList/message/31570=
;_ylc=3DX3oDMTM2cWw1MHE2BF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA=
1MTQ0NzA4BG1zZ0lkAzMxNTcxBHNlYwNmdHIEc2xrA3Z0cGMEc3RpbWUDMTIwMzUyMDE3NAR0cG=
NJZAMzMTU3MA--">
            Messages in this topic          </a> (<span class=3D"bld">2</sp=
an>)
        </span>
        <a href=3D"http://groups.yahoo.com/group/AutoItList/post;_ylc=3DX3o=
DMTJxMzNzOG1jBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1MTQ0NzA4BG=
1zZ0lkAzMxNTcxBHNlYwNmdHIEc2xrA3JwbHkEc3RpbWUDMTIwMzUyMDE3NA--?act=3Dreply&=
messageNum=3D31571">
          <span class=3D"bld">
            Reply          </span> (via web post)
        </a>  |=20
        <a href=3D"http://groups.yahoo.com/group/AutoItList/post;_ylc=3DX3o=
DMTJlNTVxdmJxBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1MTQ0NzA4BH=
NlYwNmdHIEc2xrA250cGMEc3RpbWUDMTIwMzUyMDE3NA--" class=3D"bld">
          Start a new topic        </a>
          </div>=20
    <!-------     Start Nav Bar  ------>
    <!-- |**|begin egp html banner|**| -->
    <div id=3D"ygrp-vitnav">
                <a href=3D"http://groups.yahoo.com/group/AutoItList/message=
s;_ylc=3DX3oDMTJlZGRjNDlrBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNz=
A1MTQ0NzA4BHNlYwNmdHIEc2xrA21zZ3MEc3RpbWUDMTIwMzUyMDE3NA--">Messages</a> =
=20
            |    <a href=3D"http://groups.yahoo.com/group/AutoItList/files;=
_ylc=3DX3oDMTJmaWNpNmZhBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1=
MTQ0NzA4BHNlYwNmdHIEc2xrA2ZpbGVzBHN0aW1lAzEyMDM1MjAxNzQ-">Files</a>=20=20
            |    <a href=3D"http://groups.yahoo.com/group/AutoItList/photos=
;_ylc=3DX3oDMTJldHQ4ZDBlBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA=
1MTQ0NzA4BHNlYwNmdHIEc2xrA3Bob3QEc3RpbWUDMTIwMzUyMDE3NA--">Photos</a>=20=20
            |    <a href=3D"http://groups.yahoo.com/group/AutoItList/links;=
_ylc=3DX3oDMTJmazc2Y28xBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1=
MTQ0NzA4BHNlYwNmdHIEc2xrA2xpbmtzBHN0aW1lAzEyMDM1MjAxNzQ-">Links</a>=20=20
            |    <a href=3D"http://groups.yahoo.com/group/AutoItList/databa=
se;_ylc=3DX3oDMTJjbmp0bjM1BF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxN=
zA1MTQ0NzA4BHNlYwNmdHIEc2xrA2RiBHN0aW1lAzEyMDM1MjAxNzQ-">Database</a>=20=20
            |    <a href=3D"http://groups.yahoo.com/group/AutoItList/polls;=
_ylc=3DX3oDMTJmbmxtNjNkBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1=
MTQ0NzA4BHNlYwNmdHIEc2xrA3BvbGxzBHN0aW1lAzEyMDM1MjAxNzQ-">Polls</a>=20=20
            |    <a href=3D"http://groups.yahoo.com/group/AutoItList/member=
s;_ylc=3DX3oDMTJlcG04NGM0BF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNz=
A1MTQ0NzA4BHNlYwNmdHIEc2xrA21icnMEc3RpbWUDMTIwMzUyMDE3NA--">Members</a> =
=20
            |    <a href=3D"http://groups.yahoo.com/group/AutoItList/calend=
ar;_ylc=3DX3oDMTJkNGM0OGIzBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxN=
zA1MTQ0NzA4BHNlYwNmdHIEc2xrA2NhbARzdGltZQMxMjAzNTIwMTc0">Calendar</a>=20=20
    </div>=20=20
    <!-- |**|end egp html banner|**| -->

                <div id=3D"ygrp-grft">
              </div>
=20=20=20=20
    <!-- yahoo logo -->
    <!-- |**|begin egp html banner|**| -->
    <div id=3D"ygrp-ft">
      <a href=3D"http://groups.yahoo.com/;_ylc=3DX3oDMTJkdTlmMzE4BF9TAzk3Mz=
U5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1MTQ0NzA4BHNlYwNmdHIEc2xrA2dmcARzd=
GltZQMxMjAzNTIwMTc0">
      <img src=3D"http://us.i1.yimg.com/us.yimg.com/i/yg/img/logo/ma_grp_16=
0.gif" height=3D"15" width=3D"106" border=3D"0" alt=3D"Yahoo! Groups"></a> =
<br>
      <a href=3D"http://groups.yahoo.com/group/AutoItList/join;_ylc=3DX3oDM=
TJmbXZtcjk3BF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1MTQ0NzA4BHNl=
YwNmdHIEc2xrA3N0bmdzBHN0aW1lAzEyMDM1MjAxNzQ-">Change settings via the Web</=
a> (Yahoo! ID required) <br>
      Change settings via email: <a href=3D"mailto:AutoItList-digest@yahoog=
roups.com?subject=3DEmail Delivery: Digest">Switch delivery to Daily Digest=
</a> | <a href =3D "mailto:[email protected]?subject=
=3DChange Delivery Format: Traditional">Switch format to Traditional</a> <b=
r>

      <a href=3D"http://groups.yahoo.com/group/AutoItList;_ylc=3DX3oDMTJkMD=
kwa2FmBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1MTQ0NzA4BHNlYwNmd=
HIEc2xrA2hwZgRzdGltZQMxMjAzNTIwMTc0">
        Visit Your Group=20
      </a> |
      <a href=3D"http://docs.yahoo.com/info/terms/">
        Yahoo! Groups Terms of Use      </a> |
      <a href=3D"mailto:[email protected]?subject=3D">
        Unsubscribe      </a>=20
    </div>     <!-- |**|end egp html banner|**| -->
  </div> <!-- ygrp-msg -->

=20=20
  <!-- Sponsor -->
  <!-- |**|begin egp html banner|**| -->
  <div id=3D"ygrp-sponsor" style=3D"width:140px;float: left; clear: none; m=
argin-left: 5px; background:white; margin-bottom:25px ;position:absolute; t=
op:0; right: 0;">
    <!-- Network content -->
=20=20=20=20
    <!-- Start vitality -->
    <div id=3D"ygrp-vital">
              <div id=3D"vithd">Recent Activity</div>
        <ul style=3D"list-style-type:none; padding: 0; margin: 2px 0;">
                <li style=3D"clear: both;">
      <div class=3D"ct" style=3D"float: right;"><span style=3D"display:none=
">&nbsp;</span>12</div>
      <div class=3D"cat"><a href=3D"http://groups.yahoo.com/group/AutoItLis=
t/members;_ylc=3DX3oDMTJmMm5sZGYxBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3=
BJZAMxNzA1MTQ0NzA4BHNlYwN2dGwEc2xrA3ZtYnJzBHN0aW1lAzEyMDM1MjAxNzQ-">New Mem=
bers</a></div>
    </li>
=20=20
=20=20=20=20=20=20=20=20=20=20=20=20
=20=20=20=20=20=20=20=20=20=20=20=20
=20=20=20=20=20=20=20=20=20=20=20=20
=20=20=20=20=20=20=20=20=20=20=20=20
=20=20=20=20=20=20=20=20=20=20=20=20
        </ul>
            <a href=3D"http://groups.yahoo.com/group/AutoItList;_ylc=3DX3oD=
MTJlZDBydHIxBF9TAzk3MzU5NzE0BGdycElkAzMwMjM1NTAEZ3Jwc3BJZAMxNzA1MTQ0NzA4BHN=
lYwN2dGwEc2xrA3ZnaHAEc3RpbWUDMTIwMzUyMDE3NA--">
        Visit Your Group      </a>
    </div>=20
=20=20=20=20=20=20=20=20=20=20=20=20=20=20
    <!-- Network content -->
              <div id=3D"nc">
              <div class=3D"ad">
                      <div id=3D"hd1">Need traffic?</div>=20
<p><a href=3D"http://us.ard.yahoo.com/SIG=3D13o005qps/M=3D493064.12016308.1=
2445700.8674578/D=3Dgroups/S=3D1705144708:NC/Y=3DYAHOO/EXP=3D1203527375/L=
=3D/B=3DzV1AGULaX9E-/J=3D1203520175016716/A=3D3848644/R=3D0/SIG=3D131l83flq=
/*http://searchmarketing.yahoo.com/arp/srchv2.php?o=3DUS2006&cmp=3DYahoo&ct=
v=3DGroups5&s=3DY&s2=3D&s3=3D&b=3D50">Drive customers</a></p>=20
<p>With search ads</p>=20
<p>on Yahoo!</p>                  </div>
                    <div class=3D"ad">
                      <div id=3D"hd1">Featured Y! Groups</div>=20
<p><a href=3D"http://us.ard.yahoo.com/SIG=3D13og4gjfd/M=3D493064.12016306.1=
2445698.8674578/D=3Dgroups/S=3D1705144708:NC/Y=3DYAHOO/EXP=3D1203527375/L=
=3D/B=3Dzl1AGULaX9E-/J=3D1203520175016716/A=3D4763760/R=3D0/SIG=3D11ou7otip=
/*http://advision.webevents.yahoo.com/bestofyahoogroups/">and category page=
s.</a></p>=20
<p>There is something</p>=20
<p>for everyone.</p>                  </div>
                    <div class=3D"ad">
                      <div id=3D"hd1">Curves on Yahoo!</div>=20
<p><a href=3D"http://us.ard.yahoo.com/SIG=3D13prrqeri/M=3D493064.12016299.1=
2445691.11322765/D=3Dgroups/S=3D1705144708:NC/Y=3DYAHOO/EXP=3D1203527375/L=
=3D/B=3Dz11AGULaX9E-/J=3D1203520175016716/A=3D4990221/R=3D0/SIG=3D11odsb6gn=
/*http://new.groups.yahoo.com/Women_Of_Curves_Everywhere">A group for women=
</a></p>=20
<p>to share &amp; discuss</p>=20
<p>food &amp; weight loss.</p>                  </div>
          </div>
=20=20=20=20
  </div>   <!-- |**|end egp html banner|**| -->
  <div style=3D"clear:both; color: #FFF; font-size:1px;">.</div>
</div>   <img src=3D"http://geo.yahoo.com/serv?s=3D97359714/grpId=3D3023550=
/grpspId=3D1705144708/msgId=3D31571/stime=3D1203520174/nc1=3D3848644/nc2=3D=
4763760/nc3=3D4990221" width=3D"1" height=3D"1"> <br>

<span  style=3D"color: white;">__,_._,___</span>
<!--~-|**|PrettyHtmlEnd|**|-~-->
</body>
<!--~-|**|PrettyHtmlStart|**|-~-->
<head>
<style type=3D"text/css">
<!--
#ygrp-mkp{
  border: 1px solid #d8d8d8;
  font-family: Arial;
  margin: 14px 0px;
  padding: 0px 14px;
}
#ygrp-mkp hr{
  border: 1px solid #d8d8d8;
}
#ygrp-mkp #hd{
  color: #628c2a;
  font-size: 85%;
  font-weight: bold;
  line-height: 122%;
  margin: 10px 0px;
}
#ygrp-mkp #ads{
  margin-bottom: 10px;
}
#ygrp-mkp .ad{
  padding: 0 0;
}
#ygrp-mkp .ad a{
  color: #0000ff;
  text-decoration: none;
}
-->
</style>
</head>
<head>
<style type=3D"text/css">
<!--
#ygrp-sponsor #ygrp-lc{
  font-family: Arial;
}
#ygrp-sponsor #ygrp-lc #hd{
  margin: 10px 0px;
  font-weight: bold;
  font-size: 78%;
  line-height: 122%;
}
#ygrp-sponsor #ygrp-lc .ad{
  margin-bottom: 10px;
  padding: 0 0;
}
-->
</style>
</head>
<head>
<style type=3D"text/css">
<!--
#ygrp-mlmsg {font-size:13px; font-family: arial,helvetica,clean,sans-serif;=
*font-size:small;*font:x-small;}
#ygrp-mlmsg table {font-size:inherit;font:100%;}
#ygrp-mlmsg select, input, textarea {font:99% arial,helvetica,clean,sans-se=
rif;}
#ygrp-mlmsg pre, code {font:115% monospace;*font-size:100%;}
#ygrp-mlmsg * {line-height:1.22em;}
#ygrp-text{
    font-family: Georgia;=09
}
#ygrp-text p{
    margin: 0 0 1em 0;
}
#ygrp-tpmsgs{
    font-family: Arial;=09
    clear: both;
}
#ygrp-vitnav{
	padding-top: 10px;
	font-family: Verdana;
	font-size: 77%;
	margin: 0;
}
#ygrp-vitnav a{
	padding: 0 1px;
}
#ygrp-actbar{
	clear: both;
	margin: 25px 0;
	white-space:nowrap;
	color: #666;
	text-align: right;
}
#ygrp-actbar .left{
	float: left;
	white-space:nowrap;
}
.bld{font-weight:bold;}
#ygrp-grft{
	font-family: Verdana;
	font-size: 77%;
	padding: 15px 0;
}
#ygrp-ft{
  font-family: verdana;
  font-size: 77%;
  border-top: 1px solid #666;=20
  padding: 5px 0;=20
}
#ygrp-mlmsg #logo{
  padding-bottom: 10px;
}

#ygrp-vital{
	background-color: #e0ecee;
	margin-bottom: 20px;
	padding: 2px 0 8px 8px;
}
#ygrp-vital #vithd{
	font-size: 77%;
	font-family: Verdana;
	font-weight: bold;
	color: #333;
	text-transform: uppercase;
}
#ygrp-vital ul{
	padding: 0;
	margin: 2px 0;
}
#ygrp-vital ul li{
  list-style-type: none;
  clear: both;
  border: 1px solid #e0ecee;=20=20
}
#ygrp-vital ul li .ct{
  font-weight: bold;
  color: #ff7900;
  float: right;
  width: 2em;
  text-align:right;
  padding-right: .5em;
}
#ygrp-vital ul li .cat{
  font-weight: bold;
}
#ygrp-vital a{
	text-decoration: none;
}

#ygrp-vital a:hover{
  text-decoration: underline;
}

#ygrp-sponsor #hd{
	color: #999;
	font-size: 77%;
}
#ygrp-sponsor #ov{
	padding: 6px 13px;
	background-color: #e0ecee;
	margin-bottom: 20px;
}
#ygrp-sponsor #ov ul{
	padding: 0 0 0 8px;
	margin: 0;
}
#ygrp-sponsor #ov li{
	list-style-type: square;
	padding: 6px 0;
	font-size: 77%;
}
#ygrp-sponsor #ov li a{
	text-decoration: none;
	font-size: 130%;
}
#ygrp-sponsor #nc{
  background-color: #eee;
  margin-bottom: 20px;
  padding: 0 8px;
}
#ygrp-sponsor .ad{
	padding: 8px 0;
}
#ygrp-sponsor .ad #hd1{
	font-family: Arial;
	font-weight: bold;
	color: #628c2a;
	font-size: 100%;
	line-height: 122%;
}
#ygrp-sponsor .ad a{
	text-decoration: none;
}
#ygrp-sponsor .ad a:hover{
	text-decoration: underline;
}
#ygrp-sponsor .ad p{
	margin: 0;
}
o{font-size: 0; }
.MsoNormal{
   margin: 0 0 0 0;
}
#ygrp-text tt{
  font-size: 120%;
}
blockquote{margin: 0 0 0 4px;}
.replbq{margin:4}
-->
</style>
</head>
<!--~-|**|PrettyHtmlEnd|**|-~-->
</html><!--End group email -->


--qjxTQMJ4FeGMJe6RsVRAKRr-Mp3bCGRESMqkf5f--