gpt4 book ai didi

vbscript - 检查文件是否存在并(仅当存在时)打开另一个文件(或文件夹)或运行应用程序

转载 作者:行者123 更新时间:2023-12-02 18:55:33 24 4
gpt4 key购买 nike

我正在寻找一个 vb 脚本,用于检查(在特定路径)文件是否存在,并且(仅当它确实存在时)然后打开另一个文件(或文件夹)或运行应用程序。

最佳答案

Set fileSystemObject = CreateObject("Scripting.FileSystemObject")

If fileSystemObject.FileExists(file) Then

'Do what you need

End If

关于vbscript - 检查文件是否存在并(仅当存在时)打开另一个文件(或文件夹)或运行应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12670123/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com