Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Trim  lines  in  files  

 Content of Trim lines in files.vbs
MD5 Hash: 72C2F81EC392E4D37238D0E57CDDD81E
' Drag and drop the file over the Script

On Error Resume Next
Dim ofso : Set ofso = CreateObject("Scripting.FileSystemObject")


' --------------------- Constants / working with Textfiles
Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8


If ofso.FileExists(wscript.arguments(0)) then

Dim strFilePath : strFilePath = wscript.arguments(0)
Dim oFile : Set oFile = ofso.OpenTextFile(strFilePath, ForReading)
Dim sLine : sLine = ""

Do Until oFile.AtEndOfStream
sLine = sLine & Trim(oFile.Readline) & vbcrlf
Loop
oFile.Close

sLine = Left(sLine,Len(sLine)-2)

Set oFile = ofso.OpenTextFile(wscript.arguments(0),ForWriting)
oFile.Write sLine
oFile.Close

End if

   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a