vbs中獲取腳本當(dāng)前路徑的2個(gè)方法

字號(hào):


    方法一:
    代碼如下:
    currentpath = createobject("Scripting.FileSystemObject").GetFolder(".").Path
    方法二:
    代碼如下:
    currentpath = createobject("Scripting.FileSystemObject").GetFile(Wscript.ScriptFullName).ParentFolder.Path