If you're looking to log files that are found, or at least report them to the screen, you can alter that to read:
Main Topics
Browse All TopicsHello,
I am trying to check a number of files in a network directory and if any files do not exsist in this directory write the file name(s) into a text file, so far i have the below VBS code which checks to see if two files exsist or not and displays appropiate messages, what i have so far works but would like some help writting the names of any files not found in the network directory into a text file.
Would like any files not found to be saved as a list in the text file. There are about 30 files i would like to check to see if they exsist or not.
Dim objFSO, objWSH, strCmd, strCmd2
set objFSO = CreateObject("Scripting.Fi
set objWSH = CreateObject("WScript.Shel
strCmd = "\\FileServer\\Reports_dai
strCmd2 = "\\FileServer\\Reports_dai
If objFSO.FileExists(strcmd) Then
MsgBox "Bookings File one exists"
Else
MsgBox "Bookings File one does not exist"
'Write missing file name to a text file
End If
If objFSO.FileExists(strcmd2)
MsgBox "Stock report File two exists"
Else
MsgBox "Stock report File two does not exist"
'Write missing file name to a text file
End If
Any suggestions/help would be great
Kevin
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: sirbountyPosted on 2008-06-03 at 04:45:53ID: 21699337
Try this....
Select allOpen in new window