Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
folderspec="d:\test\data" [blue]'<<<edit this[/blue]
listfilespec="d:\test\filelist.txt" [blue]'<<<edit this[/blue]
set fso=createobject("scripting.filesystemobject")
if not fso.fileexists(listfilespec) then
wscript.echo "List file not found. Operation aborted."
set fso=nothing
wscript.quit (1)
end if
if not fso.folderexists(folderspec) then
wscript.echo "Target folder not found. Operation aborted."
set fso=nothing
wscript.quit (2)
end if
set odic=createobject("scripting.dictionary")
set ots=fso.opentextfile(listfilespec,1)
do while not ots.atEndOfStream
s=ots.readline
if (trim(s)<>"") and (not odic.exists(s)) then
odic.add trim(s),"m" 'm missing
end if
loop
ots.close : set ots=nothing
for each ofile in fso.getfolder(folderspec).files
if odic.exists(ofile.name) then odic.remove(ofile.name)
next
if odic.count=0 then
wscript.echo "All listed files are found in the folder " & folderspec & "."
set odic=nothing : wscript.quit
end if
msg="The following files are missing : " & vbcrlf & vbcrlf
for each skey in odic.keys
msg=msg & skey & vbcrlf
next
set odic=nothing
wscript.echo msg
folderspec="d:\test\data" [blue]'<<<edit this[/blue]
listfilespec="d:\test\filelist.txt" [blue]'<<<edit this[/blue]
set fso=createobject("scripting.filesystemobject")
if not fso.fileexists(listfilespec) then
wscript.echo "List file not found. Operation aborted."
set fso=nothing
wscript.quit (1)
end if
if not fso.folderexists(folderspec) then
wscript.echo "Target folder not found. Operation aborted."
set fso=nothing
wscript.quit (2)
end if
set odic=createobject("scripting.dictionary")
set ots=fso.opentextfile(listfilespec,1)
do while not ots.atEndOfStream
s=[blue]lcase(ots.readline)[/blue]
if (trim(s)<>"") and (not odic.exists(s)) then
odic.add trim(s),"m" 'm missing
end if
loop
ots.close : set ots=nothing
for each ofile in fso.getfolder(folderspec).files
[blue]sext=lcase(fso.getextensionname(ofile))
sbase=lcase(fso.getbasename(ofile))
for i=1 to len(sbase)-1
spseudokey=left(sbase,i) & "*." & sext
if odic.exists(spseudokey) then odic.remove(spseudokey) : exit for
next[/blue]
next
if odic.count=0 then
wscript.echo "All listed files are found in the folder " & folderspec & "."
set odic=nothing : wscript.quit
end if
msg="The following files are missing : " & vbcrlf & vbcrlf
for each skey in odic.keys
msg=msg & skey & vbcrlf
next
set odic=nothing
wscript.echo msg