获取当前路径

'************************************
'函数功能:获取项目路径并返回
'输入参数:
' 无
'返回值:
' 返回类型,目录对象
'示例调用:
'temp = GetPath
'*************************************
Public Function GetPath
On Error Resume Next


GetPath= createobject("Scripting.FileSystemObject").GetFile(Wscript.ScriptFullName).ParentFolder.Path
'GetPath = CreateObject("Scripting.FileSystemObject").GetFolder(".").Path
If Err.Number<>0 Then
MsgBox Err.Description
Err.Clear
End If
End Function

你可能感兴趣的:(路径)