Page 1 of 1

Copy() function doesn't work with big files

Posted: May 1st, 2019, 3:04 pm
by Cad81
Hi guys,

i have a problem with copy() function. With small files, it works fine, but bigger files (about 4GB ) are interrupted at variable size (same size for the same file, but different size from other files). The drive is NTFS formatted and there are a lot of free GB.

PS: the script is for premiere, but i think the issue is not software related.

Thank you!

Re: Copy() function doesn't work with big files

Posted: May 7th, 2019, 4:47 pm
by zlovatt
A better approach may be to use

Code: Select all

system.callSystem()
instead, and write OS-level commands to copy the file. This way is more robust and much more flexible.

Re: Copy() function doesn't work with big files

Posted: August 19th, 2019, 3:05 pm
by Cad81_temp
zlovatt wrote: May 7th, 2019, 4:47 pm A better approach may be to use

Code: Select all

system.callSystem()
instead, and write OS-level commands to copy the file. This way is more robust and much more flexible.
Ops, sorry for the delay and thank you. I posted in several forum and i partially resolved with a workaround (execute a .bat)

Now, i have some questions:

1- the callsystem() is available also for premiere pro? Searching, i read that it doesn't work in premiere, but there is a similar function, something like "window.cep.process.createProcess()"..do you know anything about this?

2- also for premiere pro, is possible tu use system.osName to know if the running os is win or mac?

3- the script i'm writing, copy a lot of file that has been used in the project, in a folder...with systemcall() [or window.cep...].
is a good idea to run the systemcall throught a for loop? (each iteration is a single file copy)
Or is better to make a batch file (win and mac) with all the copy() files command and then run it once?

Thank you again and sorry for my english :D