亚洲免费乱码视频,日韩 欧美 国产 动漫 一区,97在线观看免费视频播国产,中文字幕亚洲图片

      1. <legend id="ppnor"></legend>

      2. 
        
        <sup id="ppnor"><input id="ppnor"></input></sup>
        <s id="ppnor"></s>

        vbs向指定的文件添加內(nèi)容的函數(shù)

        字號:


            用vbscript實現(xiàn)的向指定的文件寫字符串,第三個參數(shù)指定是否刪除原來的內(nèi)容,喜歡的朋友可以測試系
            代碼如下:
            '向指定的文件寫字符串,第三個參數(shù)指定是否刪除原來的內(nèi)容
            Function Z_WriteFile(sFileName, sText, bAppend)
            Dim fs, fso, iomode
            if bAppend = True Then
            iomode = 8 'ForAppending
            else
            iomode = 2 'ForWriting
            end if
            set fs = CreateObject("Scripting.FileSystemObject")
            set fso = fs.OpenTextFile(sFileName, iomode, True) '第三個參數(shù)表明文件不存在,則新建文件
            fso.WriteLine sText
            fso.Close
            set fso = Nothing
            set fs = Nothing
            End Function
            Dim path, sFileName, sText
            path = "E:\Program\VBScript"
            sFileName = path & "\1.txt"
            sText = "what can I do for you"
            Z_WriteFile sFileName, sText, True
            Z_WriteFile中的第三個參數(shù)指定向文件末尾添加內(nèi)容還是清除原來的內(nèi)容再插入內(nèi)容。