Category: Tips and Tricks

Copy large files via Internet

Recently,¬†while copying large files to SharePoint document library via Internet I ran into the issue “The semaphore timeout period has expired”. You find more details about this issue in the link.

One possible solution is to compress the files and split them up to the size as per the limitation of the network bandwidth. We can easily achieve this via the 7Zip tool.

Follow below steps and utilities to copy the large files over Internet.

  • Install 7 zip utility
  • Copy your files to a folder and move to the folder using the CD command
  • Use below command to compress the files individually using ultra compression method and split the files upto 50 MB in length
    FOR %i IN (*.*) DO “C:\Program Files\7-Zip\7z.exe” a “%~ni.7z” “%i” -m0=lzma2 -mx=9 -aoa -v50m
  • Following portion of the command takes all files in the current directory and compresses them individually
    FOR %i IN (*.*) DO “C:\Program Files\7-Zip\7z.exe” a “%~ni.7z” “%i”
  • Following portion of the command uses ultra compression level and lzma2 method (-m0=lzma2 -mx=9 -aoa )
  • Following portion of the command splits the file to 50 MB chunks. (-v50m)
  • RoboCopy is the tool to copy files between different drives with a lot of failover options. You can find more details in link. You can download the GUI tool from here.
  • You can map the Sharepoint folder to your local drive. Please find more details in this link.
  • Use RoboCopy to copy the files from

References