I am working on a script where part of it looks at a directory for any .csv files. If there are any .csv files, it creates a folder in another directory and copies the .csv file to that directory. So far, my script creates the directory whether or not a .csv file exists. Here's a snippet from the larger script.

Code:
Dim $ftpdir, $facility, $filename, $element, $RC, $datadir, $imported, $date
$datadir = "\\server\Data\OP\"
$date = @MONTHNO + "-" + @MDAYNO + "-" + @YEAR
$imported = "\\server\Data\imported\test\"
	If Exist ($datadir + "*.csv")
		MD $imported + $date
$importeddir = $imported + $date
		Move $datadir + "*.csv" $importeddir
		Else
	?	"Import doesn't exists"
EndIf


What is causing the IF EXIST to not work?

Also, what is the rule on wildcards when you concatenate variables and strings?

Thanks for the help.