How do i find all files starting with specific string or name in a directory in vbscript? -
Hello, I am looking for a solution that will look at some files in a directory. Say my directory is: "C: \ temp \ result" . Results folder contains 6 or more files:
File 1: "aaa.eee.txt" file 2: "aaa.bbb.txt" file3: "aaa.ccc.txt" file 4: "kkk.text" file 5: "hhhh.xml" file 6: "jjj.dll"
Now I need the files whose name is started with "Aaa." . Please help me
Any help would be appreciated. Thanks in advance.
for each file with CreateObject ("Scripting.FileSystemObject"). GetFolder ("c: \ temp \ result"). If you want the file with StrComp (left (File.Name, 3), "AAA", vbTextCompare) = 0 then 'end with the file if you want end with this file
Comments
Post a Comment