Read and write into a file using VBScript

前端 未结 9 1504
轮回少年
轮回少年 2020-11-27 06:34

How can we read and write some string into a text file using VBScript? I mean I have a text file which is already present so when I use this code below:-

Set         


        
9条回答
  •  天涯浪人
    2020-11-27 07:16

    Don't think so...you can only use openTextFile for reading (1), writing (2), or appending (8). Reference here.

    If you were using VB6 instead of VBScript, you could do:

    Open "Filename" [For Mode] [AccessRestriction] [LockType] As #FileNumber
    

    Using the Random mode. For example:

    Open "C:\New\maddy.txt" For Random As #1
    

提交回复
热议问题