OK, from experience; Remember that the "directory" of the file has to be as the FTP client sees it
Now, come put "/folder/file", others use "drive:/folder/file" and other still use "/drive:/folder/file" - you have to get the right one of the server Connect to it via a FTP client and see how it sees the directory and then try that... We had to change ours depending on the server it was talking to (our code tried all examples) HTH Philip Arnold Technical Director Certified ColdFusion Developer ASP Multimedia Limited Switchboard: +44 (0)20 8680 8099 Fax: +44 (0)20 8686 7911 www.aspmedia.co.uk www.aspevents.net An ISO9001 registered company. ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ********************************************************************** > -----Original Message----- > From: Tracy Bost [mailto:[EMAIL PROTECTED]] > Sent: 29 May 2002 17:33 > To: CF-Talk > Subject: RE: CFFTP + FileExists = buggy > > > Sure....(remember, i found this to work if the ftp server is > also the localhost, but not on a remote server) > > <cfftp action="open" connection="conn" > username="#application.ftpusername#" > password="#application.ftppassword#" > server="#application.ftpserver#" stopOnError="Yes"> > > <cfftp action="changedir" connection="conn" directory="pdfs"> > > /*So far so good, can do a "getcurrentdir" and can see that I'm in the > pdfs directory like I should be */ > > /* The following line of code will throw an unknown cfftp > exception error *, filename is "myFile.pdf" / > <cfftp action="existsFile" connection="conn" remoteFile="#filename#" > > > /* I add an "/" like below, and it will not throw an error, > but will put me back in the root directory, and the file it > checks existence for is in the root directory and not the > pdfs subdirectory. This was verified by doing another > "getCurrentDir" after this command. */ > > <cfftp action="existsFile" connection="conn" > remoteFile="/#filename#" > > > /* I can try this below, again no error thrown, but the > cfftp.returnvalue is "No", when I know it to be "Yes"... Its > checking the root directory again : (. even tried things like > remoteFile="ftp://application.ftpserver/pdfs/#filename#"..This > won't return an error either, but will also give false > results on a returnvalue */ > > <cfftp action="existsFile" connection="conn" > remoteFile="pdfs/#filename#" > > > > > > ______________________________________________________________________ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists