Get the current temporary directory path in VBScript?

后端 未结 5 592
南旧
南旧 2020-12-29 06:09

The VB trick to get the path of the current temporary directory:

Private Declare Function GetTempPath Lib \"kernel32\" Alias \"GetTempPathA\" (ByVal nBufferL         


        
5条回答
  •  没有蜡笔的小新
    2020-12-29 06:37

    Const WindowsFolder = 0
    
    Const SystemFolder = 1
    
    Const TemporaryFolder = 2
    
    Dim fso: Set fso = CreateObject("Scripting.FileSystemObject")
    
    Dim tempFolder: tempFolder = fso.GetSpecialFolder(TemporaryFolder)
    

提交回复
热议问题