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:  Write  alternate  Datastream  (ADS)  to  a  File  

 Content of Write alternate Datastream (ADS) to a File.vbs
MD5 Hash: E63851E92DF107E263615BFCEB1651A0
Dim ofso : Set ofso = Createobject("Scripting.FileSystemObject")

Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8

Dim oFile
Dim myADStream : myADStream = ""


'---------- Create a new Textfile
Set oFile = ofso.CreateTextFile("testfile.log", True)
oFile.Close
Set oFile = Nothing

'---------- Write ADStream to the new Textfile
Set oFile = ofso.OpenTextFile("testfile.log:myADS", ForWriting, True)
oFile.Writeline "Testing Alternate Datastream"
oFile.Close
Set oFile = Nothing

'---------- Read ADStream from the Textfile
Set oFile = ofso.OpenTextFile("testfile.log:myADS", ForReading, True)
myADStream = oFile.Readall()
oFile.Close
Set oFile = Nothing


msgbox myADStream




   © 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