在VB中检查桌面上的文件
有没有办法在VB中搜索桌面上的文件(快捷方式文件)? 我试过: 如果 My.Computer.FileSystem.FileExists("桌面\MYFILE.lnk") 不返回任何内容
If My.Computer.FileSystem.FileExists("Desktop\MYFILE.exe") 不返回任何内容
If My.Computer.FileSystem.FileExists(Environment.SpecialFolder.Desktop\MYFILE.lnk") 不返回任何内容
If My.Computer.FileSystem.FileExists(Environment.SpecialFolder.Desktop\MYFILE.exe") 不返回任何内容
我也在谷歌上搜索过这个似乎找不到任何东西。
谢谢。
Is there anyway of searching for a file (shortcut file) on the desktop in VB?
I've tried :
If My.Computer.FileSystem.FileExists("Desktop\MYFILE.lnk")
doesnt return anything
If My.Computer.FileSystem.FileExists("Desktop\MYFILE.exe")
doesnt return anything
If My.Computer.FileSystem.FileExists(Environment.SpecialFolder.Desktop\MYFILE.lnk")
doesnt return anything
If My.Computer.FileSystem.FileExists(Environment.SpecialFolder.Desktop\MYFILE.exe")
doesnt return anything
I have searched for this too on google can't seem to find anything.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
除非你的问题刚刚输入错误,请原谅我的 VB 技能,但它不应该是:
C# 我会使用:
Unless you question has just been type incorrectly, and forgive my VB skills, but should it not be:
C# I would use:
您是否尝试过这样的操作:
基本上我只是想知道您是否确保字符串连接正确,并在必要时使用 \ 。
Have you tried it like this:
Basically I just want to know if you are making sure that your string concatenation is correct, and using the \ when necessary.