![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-05 08:00 |
48,038 topics / 350,123 posts / today 0 new / 48,251 members |
| DOS批处理 & 脚本技术(批处理室) » Please clarify the specific requirements for the VBS code. For now, here is a simple example of a VBS script to traverse drives and find the 11.exe file (this is a basic framework, you can adjust it according to actual needs): ```vbscript Set objFSO = CreateObject("Scripting.FileSystemObject") Set colDrives = objFSO.Drives For Each objDrive in colDrives If objDrive.DriveType = 3 Then 'Only process fixed drives strDrive = objDrive.Path strSearch = strDrive & "11.exe" If objFSO.FileExists(strSearch) Then WScript.Echo "Found 11.exe at: " & strSearch End If End If Next ``` Please note that this is a simple search logic. It just traverses fixed drives and checks for the existence of 11.exe directly in the root directory. If you need more complex search functions (like searching recursively in subdirectories), it needs to be further extended. |
| Printable Version 2,612 / 28 |
| Floor16 anqing | Posted 2007-02-13 11:26 |
| 高级用户 Posts 413 Credits 859 | |
|
First, thank you to the friend on floor 11.
You have the vbs, I ran it, but it searched from all drives, but just couldn't find the 11.exe program. Please pay attention to this? |
|
| Floor17 anqing | Posted 2007-02-13 12:25 |
| 高级用户 Posts 413 Credits 859 | |
|
Looking forward to experts to solve this VBS code?
|
|
| Floor18 HUNRYBECKY | Posted 2007-02-13 22:17 |
| 银牌会员 Posts 442 Credits 1,179 | |
|
It's written very well, just the code is too long, can be simplified.
|
|
| Floor19 anqing | Posted 2007-02-14 00:22 |
| 高级用户 Posts 413 Credits 859 | |
|
Because the problem is not solved, bump it up again. Hope experts come to complete it!!!
|
|
| Floor20 slore | Posted 2007-02-14 02:41 |
| 铂金会员 Posts 2,478 Credits 5,212 | |
| Floor21 anqing | Posted 2007-02-14 22:52 |
| 高级用户 Posts 413 Credits 859 | |
|
My file type is fat32, and I can't find any files under the C drive?
|
|
| Floor22 anqing | Posted 2007-02-16 03:09 |
| 高级用户 Posts 413 Credits 859 | |
|
Bump up, hope more people test
|
|
| Floor23 anqing | Posted 2007-02-16 22:26 |
| 高级用户 Posts 413 Credits 859 | |
|
Is there no one to answer?
|
|
| Floor24 3742668 | Posted 2007-02-18 07:52 |
| 荣誉版主 Posts 718 Credits 2,013 | |
|
I remember there have been many discussions about such problems, both for VBS and batch processing. It is suggested to flip through the old posts more.
|
|
| Floor25 jmz573515 | Posted 2007-02-18 08:13 |
| 银牌会员 Posts 464 Credits 1,212 | |
| Floor26 anqing | Posted 2007-02-18 08:34 |
| 高级用户 Posts 413 Credits 859 | |
|
Can't find it. Can you provide the complete code? I'm just learning VBS.
|
|
| Floor27 3742668 | Posted 2007-02-19 12:33 |
| 荣誉版主 Posts 718 Credits 2,013 | |
Originally posted by anqing at 2007-2-18 08:34: 24F is looking for desktop.ini, of course it can't be found In this version, there have been bat versions and vbs versions respectively for such problems. You can search, the keyword can be "datafile", the username can be "3742668", and also check "Search post content". |
|
| Floor28 anqing | Posted 2007-02-19 22:37 |
| 高级用户 Posts 413 Credits 859 | |
| Floor29 linnk | Posted 2007-07-02 00:38 |
| 新手上路 Posts 4 Credits 6 | |
|
Nice~~~~~~~~~
|
|
| Prev 1 2 |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |