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

Functions

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

Using WildCards with FileExist

Keywords: wildcards   fileexist	 * ?

FileExist doesn't support wildcards. So, here is a workaround:

if FileItemize("c:\somedir\*.*")==""
       message("","No files were found")
else
       message("","Files were found")

endif
Or, another example, where you first want to test if a file that has part of the filename changing, for ex: ace86.doc to ace87.doc on any given day, and you want to copy whatever that filename currently is dynamically:
	a= FileItemize("ace*.doc")
	if a != "" then FileCopy("ace*.doc", "ace.tmp", @false)

Article ID:   W13114
Filename:   WildCards with FileExist.txt
File Created: 1999:04:15:16:51:50
Last Updated: 1999:04:15:16:51:50