7 Replies Latest reply on Jul 5, 2013 4:28 AM by Andreas Jansson

    Copy Files alongwith Folders


      Hi Forum!


      I have this bit of script to copy files which resides inside the Folder.


      My request to forum, is to get help, to copy all the contents inside the folder...


      contents inside the folder, can be *.indd, *.zip, *.tif, *.eps etc., and also the folders inside the folders and its contents..


      Currently I can only able to copy only the files (*.*) inside the folder and cant able to copy the folder inside the folder and its files...


      var copyFolder1 = Folder('/Users/admin/Desktop/LZW/For General');

      var pasteFolder1 = Folder('/Volumes/CTC/Normal/MyFiles');

      var myFiles2 = copyFolder1.getFiles( '*.*');


      for ( i = myFiles2.length-1; i >= 0 ; i-- ){


      var myResult = myFiles2[i].copy(pasteFolder1 +"/" + myFiles2[i].name);



      Please can I get help to do this.


      thanks & rgs.