Skip to main content
Participant
June 11, 2018
Question

Can't Copy A File

  • June 11, 2018
  • 1 reply
  • 541 views

Here is my code:

   <cffile
  action="copy"
  source="http://webber/intranet/docs/projplan/ProposalDNCCalculator.xlsm"
  destination="http://webber/documents/P/P-#newproposalnumber#/">

Here is the error I am getting:

An error occurred when performing a file operation exists on file /documents/P/P-12143/ProposalDNCCalculator.xlsm.

The cause of this exception was: org.apache.commons.vfs.FileSystemException: Could not determine the type of file "http://webber/documents/P/P-12143/ProposalDNCCalculator.xlsm"..

Any ideas? Thanks.

    This topic has been closed for replies.

    1 reply

    WolfShade
    Legend
    June 11, 2018

    I'm not sure but I believe that the destination can only be a local path.  If the value of destination does not begin with a drive letter ("D:") or double-slash ("//") then it is saved relative to the CF temp folder.

    If you want to copy a file from a different web server to yours, then I believe you want CFFTP.

    V/r,

    ^ _ ^

    UPDATE:  OR, possibly get the file using CFHTTP and turn it into a file object, then save it using CFFILE using a full path (ie, D:\webroot\site\files).