here's the code. basically what it does, is that it puts the results of the "dir" in a text file, and then reads the text file and lists each line that has a file listed. so staff could start uploading the files into the database.
'==========================================================
dim fs, objTextFile, msg, info, info2, title, icon, wshshell, xxx, zzz
dim eachline, arrStr, struser, strfullname
Set wshshell = WScript.CreateObject("WScript.Shell")
title = "STELLAR files waiting to be uploaded"
icon=vbinformation
set fs=CreateObject("Scripting.FileSystemObject")
wshshell.Run("cmd.exe /c dir s:\research\stellar3\maindata\import\54000*.* > c:\a_pictures\steldata.txt")
'let the file get finished writing and settled.
wScript.sleep 300
set objTextFile = fs.OpenTextFile("c:\a_pictures\steldata.txt")
info = date() & "-" & time() & vbcrlf & vpcrlf
info2 = "No files are waiting for upload to Stellar" & vbcrlf
Do while NOT objTextFile.AtEndOfStream
eachline = objTextFile.ReadLine
zzz=left(eachline,1)
if left(eachline,1) <> " " then
msg = msg & eachline & vbcrlf
xxx = asc(zzz)
info2 = "The following files are waiting to be uploaded to Stellar" & vbcrlf
end if
Loop
msgbox info & info2 & msg, vbokonly, title
objTextFile.Close
set objTextFile = Nothing
set fs = Nothing