Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

DWfile.copy not working

New Here ,
Oct 16, 2007 Oct 16, 2007
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.
TOPICS
Extensions
352
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 18, 2007 Oct 18, 2007
LATEST
When you use DWfile.copy() you have to specify the file name in the "Copy To" path so try this:
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines