If you remove extra space between "if" and "(" then everything will be fine. : I have copied the sample scripts/FTP example and changed the values to match : my environment. When I compile your script or my updated script, I get a : syntax error on the IF statement line. Also, the FTPFileExists command : returns FALSE to "found", even though the FTPGetFile command : gets the file from the remote FTP server. If I can't get your scripts to : work, I can't convince my superiors to buy the product. : The script runs without the IF line. : The script returns the wrong value when the FTPFileExists line runs, via the : debugger. (Note: The path daily\cvisn\archive\ is based on a virtual : directory.) : See script below: (Yes, I use valid values in the real script) : Dim process_id, number : Dim found, boolean : // Watch for file on remote FTP site. : FTPFileExists( "server", "loginID", "password", : "daily\cvisn\archive\connect", found ) : // If the file found, : // continue processing, otherwise exit and wait for the next cycle : if ( found, DOWNLOAD, END ) : DOWNLOAD: // Download the file from Microsoft FTP site : FTPGetFile( "server", "loginID", "password", : "daily\cvisn\archive\connect", "c:\\temp\*" ) : // Do something with the downloaded file, for example you can display : // it in the Notepad : Run( "notepad c:\\temp\connect", "", process_id ) : // Delete the file - in a real-world you most likely will do this : // FTPDeleteFile( "ftp.microsoft.com", "", "", : "disclaimer.txt" ) : END: // Done : MailSend( "profile", "" , "recipient", : "Mail Test FTP worked", "" )
|