static int dm_sendFileToOtherMachine_chunkSize = 100*1024; // 1024*1024; please include function dm_sendFileToOtherMachine. // for chunkSize svoid dm_retrieveFileFromOtherMachine(S computerID, S remotePath, File f) { backupFile(f); long size = toLong(dm_evalOnOtherMachine("fileSize( + quote(remotePath) + ")"); for (LongRange r : chunks(size, dm_sendFileToOtherMachine_chunkSize)) { print("Retrieving file chunk " + r + " of " + computerID + ":" + remotePath + " to " + f); byte[] chunk = dm_evalOnOtherMachine(computerID, "loadBinaryFileChunk_base64(" + quote(remotePath) + ", " + r.start + "L, " + r.end + "L" + r.length() + ")"); saveBinaryFilePart(f, r.start, chunk); } truncateFile(f, size); print("File retrieved: " + f); }