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

I'm sure I have see a way to close down Photoshop in a Photoshop script.  I never had the need to.  It may be a simple statement like app.close(); I don't know javascript and only hack Photoshop script mostly by looking at others code.  app.close(); is a guess on my part. Let me try it. I was wrong its photoshop.quit();

 

So make your MoveToArchive.jsx look something like this

 

try{

   var BAT = new File(Folder.temp + "/MoveFilesToArchive.bat");

   BAT.open("w");

   BAT.writeln('Copy /Y "c:\\Process\\*.jpg" "c:\\Archive\\*.*"');

   BAT.writeln('Del "c:\Process\\*.jpg"');

   BAT.close();

   BAT.execute();   // execute the temp bat file

}catch(e){

alert("Bat MoveFilesToArchive  failed to execute.");

};

photoshop.quit();


Viewing all articles
Browse latest Browse all 27456

Trending Articles



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