How to determine whether there are files on a disk? I believe many people will be curious about how we should make a judgment? Now let’s take a look at the method to determine whether there are files on the disk. Interested friends come and take a look.
<%
dim objfolder
dim objfso
dim j
set fso=server.CreateObject("scripting.filesystemobject")
set objfolder=fso.GetFolder("d:/")
if objfolder.size>0 then
j=0
for each objfile in objfolder.files
j=j+1
next
if j>0 then 'There are files on this disk, there are a total of j files
.....
else
..... 'There is no file on this disk
end if
else
..... 'There is no file on this disk
end if
%>
The above is all the content of this article. I hope it will be helpful to everyone's learning, and I hope everyone will support the wrong new technology channel.