DWfile.copy not working

Ask a Question related to Macromedia Exchange Dreamweaver Extensions, Design and Development.

  1. #1

    Default DWfile.copy not working

    I have an extension that I am building and I need to copy a file automatically
    from the config folder to the users local site when they apply the extension:

    I've tried this:
    var fileURL = "file:///C|/Config/Objects/GJHDigital/test123.gif";
    var SiteFolder = site.getLocalPathToFiles() + "Test";
    DWfile.createFolder(SiteFolder);
    DWfile.copy(fileURL, SiteFolder);

    And I tried this:
    var path = dw.getConfigurationPath()+'/Objects/GJHDigital/test123.gif"';
    var path2 = site.getLocalPathToFiles();
    DWfile.copy(path, path2);

    and both do not work. No errors or anything. And the folders do exist. Does
    anyone know how to do this with Dreamweaver MX 2004? Because I understand there
    is a new way in CS3, which I do not have yet.

    gjhdigital Guest

  2. Similar Questions and Discussions

    1. DWfile.copy dies after the 1023 file
      I have an extension that copies files from the Dreamweaver site folder to a staging folder using a recursive copy function. After copying 1023...
    2. DWfile.write returning 0
      I'm trying to create a temp file for my extension, but it isn't working, here is the code I'm using. ...
    3. Copy and paste from Freehand MX to Photoshop not working
      Hi This is driving me mad!!! When I copy a tif placed in freehand to the clipboard and then try to paste in photoshop, all i get is an empty box....
    4. Shadow Copy/Previous Versions Not Working
      We have a 2003 Enterprise File Server and I'm trying to enable shadow copy on the shares. I can see that the shadow copies do get created as the...
    5. graphics copy has stopped working
      When I try to copy acrobat graphics, I either get nothing or a repetition of the first element in the graphics. Previously it worked fine. It works...
  3. #2

    Default Re: DWfile.copy not working

    When you use DWfile.copy() you have to specify the file name in the "Copy To"
    path so try this:


    var path = dw.getConfigurationPath()+'/Objects/GJHDigital/test123.gif"';
    var path2 = site.getLocalPathToFiles() + "test123.gif"; //Notice the file
    name, not just the folder
    DWfile.copy(path, path2);

    Clukey Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139