Securely Copy Files on Remote Machine in Batch-mode

Problem


Have you ever encountered a situation when you want to securely copy thousands of files to remote machine in batch mode. Suppose we have 10k files on local machine and each file have size of 1GB. We want to copy all files to remote machine but because of bandwidth issue we can copy only bunch of files at once.


Solution


For testing purpose here, we are creating the dummy pdf files using the below script.



We first create a range file based on total files in folder and then copy files in batches based on defined ranges.



Code


Code_@_Github



Leave a Reply

Your email address will not be published. Required fields are marked *