title: Delete numerical lines on a CSV (Scripting)
body: <p>I´m doing a script which connects to a web service and generate a txt file with stock data. After, it moves and renames that file. After a WP site with tablepress plugin imports that txt file each 15 minutes.
  The problem is we need to clear quite lines before wp import takes place.
  Un-modded Txt file shows like this:</p>
  
  <pre><code>122210099014
  PTA200/234
  202002800003
  902002890008
  20PHH4109/88/SC
  211301487560
  22PFL2807H/12/SC
  242201500511
  </code></pre>
  
  <p>And should be converted to:</p>
  
  <pre><code>20PHH4109/88/SC
  22PFL2807H/12/SC
  </code></pre>
  
  <p>To delete the <strong>PTA</strong> lines I use this:</p>
  
  <pre><code>Set objFS = CreateObject("Scripting.FileSystemObject")
  Set objTextFile = objFS.OpenTextFile("Z:\COMUNIDAD\TP-VISION\Script\Stock\Stock.txt")
  Set objFS1 = objFS.CreateTextFile("Z:\COMUNIDAD\TP-VISION\Script\Stock\Editedwp.txt",true)
  objFS1.close
  set objTextFile2 = objFS.OpenTextFile("Z:\COMUNIDAD\TP-VISION\Script\Stock\ParsedWP.txt",8)
  strFile = "Z:\COMUNIDAD\TP-VISION\Script\Stock\Editedwp.txt"
  
  Do Until objTextFile.AtEndOfStream
  strLine = objTextFile.ReadLine
  If InStr(strLine,"PTA")&gt; 0 Then
      strLine = Replace(strLine,"DeleteMe",1)
    Else
  objTextFile2.writeline strLine
  End If
  
  Loop
  
  set objTextFile = nothing
  set objTextFile2 = nothing
  
  objFS.copyFile "Z:\COMUNIDAD\TP-VISION\Script\Stock\EditedWP.txt", "Z:\COMUNIDAD\TP-VISION\Script\Stock\Stock.txt", true
  objfs.DeleteFile "Z:\COMUNIDAD\TP-VISION\Script\Stock\EditedWP.txt"
  
  set objfs = nothing
  set objfs1 = nothing
  </code></pre>
  
  <p>That´s let me delete some alphanumerical lines which I don´t need.
  <strong>But how to clear a line with only numerical content on the first column?</strong>
  Thanks´s a lot! </p>
  
  <p>...I was thinking about it and now I see that deleting every line with minus than 13 characters, will do the job either. So...Can this VBA works or be converted to vbs</p>
  
  <pre><code>Sub DelRows()
  Dim LR As Long, i As Long
  Application.ScreenUpdating = False
  LR = Range("A" &amp; Rows.Count).End(xlUp).Row
  For i = LR To 1 Step -1
  If Len(Range("A" &amp; i).Value) &lt; 8 Then Rows(i).Delete
  Next i
  Application.ScreenUpdating = True
  End Sub
  </code></pre>