Skip to main content
Inspiring
March 31, 2011
Question

Can't get File.copy(target) to work.

  • March 31, 2011
  • 1 reply
  • 640 views

Hi,

I'm writing a script where I want to copy a file to another location after the render has finished, but I can't get the File.copy() method to work.

Here's a snippet of the code:

app.project.renderQueue.render();
var renderedFile = app.project.renderQueue.items[1].outputModules[1].file;
renderedFile.copy("c:\\");

The render works fine and renderedFile.fullName returns the correct path and name, but the actual copying just doesn't work.

I have made sure that scripts are allowed to access files and network.

thanks

Ludde

This topic has been closed for replies.

1 reply

myrslokAuthor
Inspiring
March 31, 2011

never mind, I solved it.

It wasn't clear to me that I had to specify both target path AND file name.

This works just fine now:

renderedFile.copy("c:\\rendered.mov");

cheers

Ludde