Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 92406

Copy Files alongwith Folders

$
0
0

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.


Viewing all articles
Browse latest Browse all 92406

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>