My script is supposed to check to see if a local directory exists & if it DOES NOT exist I want to copy a couple of folders from a network share (that has full access to everyone on share & file/folder levels) to the local directory. This seems to copy the folder over even though the local directory exists. I am not getting an error message.

Attaching code as file PACS.kix and pasting below:

 Code:
$path = DIR("C:\Documents and Settings\ctxtest3\Application Data\Amicas\config")

IF EXIST $path
	USE P: "\\varda\Citrixscripts"
	QUIT 9

ELSE
	USE R: "\\varda\i386"
	COPY "\\varda\citrixscripts\PACs\Amicas\" "C:\Documents and Settings\%USERNAME%\Application Data\Amicas\" /s /h
	COPY "\\varda\citrixscripts\PACs\Sun\" "C:\Documents and Settings\%USERNAME%\Application Data\Sun\" /s /h
	USE R: /DEL
ENDIF


Edited by Allen (2010-03-10 09:37 PM)
Edit Reason: added code tags