WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Miscellaneous

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Multiple FileExist Statement

Keywords:  FileExist && ||   Logical Or	 Logical And

Question:

How do you structure multiple FileExists in one statement?

Answer:

Here's how to do it. In order for the "if" portion to be satisfied, all of the files must exist:

if fileexist("hurrell.wbt") && fileexist("junk2.wbt") && fileexist("junk4.exe") && fileexist("ftp.tmp")
  message("This works", "This works")
else
  message("This doesn't work", "This doesn't work")
endif

Article ID:   W13448
Filename:   Logical And with FileExist Statement.txt
File Created: 2001:01:26:14:52:48
Last Updated: 2001:01:26:14:52:48