Add files via upload

master
AiTechEye 2021-02-14 22:10:09 +01:00 committed by GitHub
parent 0bd43290fb
commit aa6eb36f19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 36 additions and 0 deletions

36
look_for_text.vbs Normal file
View File

@ -0,0 +1,36 @@
look_for_text="text"
file_type=".lua"
folder_name = "foldername"
'vbCrLf = new line
'vbtab = tab
'eg text= vbtab&"alpha = "
'looks for:
' alpha =
set sf=CreateObject("Scripting.FileSystemObject")
pp=sf.GetAbsolutePathName(folder_name)
sub folder(p)
for each fo in sf.GetFolder(p).subfolders
cfolders=cfolders+1
folder(fo)
for each fi1 in sf.GetFolder(fo).Files
if instr(fi1.name,file_type)<>0 then
if not sf.OpenTextFile(fi1.path,1).AtEndOfStream then
f=sf.OpenTextFile(fi1.path,1).readall
if instr(f,look_for_text) <> 0 then
msgbox(fi1.path)
end if
end if
end if
next
next
end sub
folder(pp)