Quantcast
Channel: Adobe Community: Message List - Photoshop Scripting
Viewing all articles
Browse latest Browse all 27456

Re: Move files from one folder to another javascript?

$
0
0

Hi,

this might help:

 

// Use at your own risk
// test it before!
var sourceFolder = new Folder("~/Desktop/temp/source");
var destFolder = new Folder("~/Desktop/temp/destination");
var fileList = sourceFolder.getFiles();
for (var i = 0; i < fileList.length; i++) {    if (fileList[i].copy(decodeURI(destFolder) + "/" + fileList[i].displayName)) {        fileList[i].remove();    } 
}

 

Regards,

 

Davide Barranca

---

www.davidebarranca.com

www.cs-extensions.com


Viewing all articles
Browse latest Browse all 27456

Trending Articles



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