VB脚本+查找我在哪个目录下(比如linux的pwd) [英] VB script + find under which directory I am (like pwd for linux)
本文介绍了VB脚本+查找我在哪个目录下(比如linux的pwd)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何获取我运行我的VB脚本的本地目录的路径
How to get the path of the local directory that I run my VB script
例如
我有 text.vb 脚本我需要将 VB 代码添加到此脚本中,以查找我运行 test.vb 脚本的目录的 PATH(例如 LINUX/UNIX 的 pwd)
I have text.vb script I need to add to this script VB code that finds the PATH of the directory that I run the test.vb script (like pwd for LINUX/UNIX)
THX
耶尔
推荐答案
我认为这可行:
Dim currDir
Set fso = CreateObject("Scripting.FileSystemObject")
currDir = fso.GetParentFolderName(Wscript.ScriptFullName)
或者也许你可以这样做:
Or maybe you can just do this:
Replace(WScript.ScriptFullName, WScript.ScriptName, "")
这篇关于VB脚本+查找我在哪个目录下(比如linux的pwd)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文