Most email and messaging services set a limit on the size of files you can send. Additionally, if you have many large files, managing them can be challenging, especially on older hardware. If you're using Windows, you can split larger files into smaller ones and recreate the larger files when you need them later by rejoining the smaller ones. You can do so using various file archiving tools.
Option 1: Using WinRAR
WinRAR is among the most popular file compression and archiving tools you can use to split a large file into smaller chunks.
- Visit the official WinRAR website and click on the blue 'Download' button to download the tool.
- Once the file is downloaded, install WinRAR on your Windows computer. After the installation is complete, leave the default options checked and click on the 'OK' button before clicking on 'Done'.
- Now, navigate to where the large file you want to split is stored and right-click on it. Then go to 'WinRAR' and click on 'Add to archive'.
- The default archive format is RAR but you can change it to RAR4 or Zip. Check that the compression method is set to Normal and use the default setting for the Dictionary size setting.
- Specify the size of the smaller files using the 'Split to Volumes, size' dropdown menu.
- If you want, you can use the 'Set password' button to protect your archive. Once you're ready, click on the 'OK' button to start splitting the large file into smaller ones.
- Depending on the size of the file, the process can take some time to complete. WinRAR will name the smaller archives Part 1, Part 2, etc.
- Make sure the split parts are all stored in the same location; otherwise, you won't be able to merge them and recreate the larger file. To do so, right-click on Part 1, go to WinRAR, and click on 'Extract files'. Then select the destination before clicking on the 'OK' button.
Option 2: With 7-zip
If you're looking for a free and open-source file compression and archiving tool, 7-zip is an excellent choice. Like WinRAR, it can help you split large files into smaller ones and rejoin them later.
- Go to the 7-zip website using your web browser and download the version you prefer.
- Install 7-zip after downloading the setup and then go to the file you want to split. Right-click on it and go to 'Add to archive' and then '7-Zip' from the sub-menu.
- Enter your preferred size for the split files in the 'Split to volumes, bytes' box, or use the dropdown to select a preset when the 7-zip window opens. If you enter
1GB
, 7-zip will create smaller 1GB files from the larger file.
- You can use the 'Encryption' option to password-protect your split files if you want. Leave the other settings to their default values and click on the 'OK' button.
- Again, you'll need to wait for some time and let the process complete. The split files will have the filename followed by oo1, 002, oo3, etc. To merge the files, right-click on the first file, go to 7-zip, and click on 'Extract files'.
Option 3: Using Git Bash
Git Bash lets you split large files into smaller ones using the command line.
- Visit the Git Bash website and download the tool for Windows.
- Install Git Bash with default settings and then open a File Explorer window before navigating to where the file you want to split is located. Right-click on an empty space in the window and click on 'Open Git Bash here'.
- When the Git Bash window opens, enter the following script, replacing 'SplitFile' with the names you want for the split files, 'MyFile.ext' with the name of the file to be split, and replacing '10M' with the size you want for each split chunk. Press Enter after typing in the script.
split -b 10M MyFile.ext SplitFile_
- Use the following script in Git Bash to recombine the split files into a larger file, replacing 'OriginalFile.ext' with the name you want the recreated file to have and replacing 'SplitFile_' with the prefix you used earlier for the split files.
cat SplitFile_* > OriginalFile.ext
Option 4: With PowerShell
You can use Windows PowerShell to split large files if you don't want to rely on third-party tools.
- Open the Start menu, type
powershell
and open the utility when it appears in the search results.
- In the PowerShell window, type
cd PATH
replacing PATH with the complete path of the folder where you've stored the file to be split.
- Now, you can use the following script in PowerShell. Just replace 'MyFile.ext' with the complete path of the file to be split. You can also replace '10MB' with the size in which you want the file to be split.
$file = "MyFile.ext"$chunkSize = 10MB$fileStream = [System.IO.File]::OpenRead($file)try { $buffer = New-Object byte[] $chunkSize $i = 0 while ($bytesRead = $fileStream.Read($buffer, 0, $buffer.Length)) { $chunkFileName = "$($file)_Chunk_$i" [System.IO.File]::WriteAllBytes($chunkFileName, $buffer[0..($bytesRead - 1)]) $i++ }} finally { $fileStream.Close()}
- PowerShell will split the large file into multiple smaller files in the same location as the original file. You can recombine the smaller files using the following script, replacing 'MyFile.mp4' with names of the split files, replacing 'PATH' with the path of the file, and replacing 'RecombinedFile.ext' with the name you want for the recreated file.
$outputFile = "RecombinedFile.ext"$chunkFiles = Get-ChildItem -Path "PATH" -Filter "MyFile.mp4_Chunk_*" | Sort-Object Nameif (Test-Path $outputFile) { Remove-Item $outputFile}$outputFileStream = [System.IO.File]::Create($outputFile)try { foreach ($chunk in $chunkFiles) { $chunkData = [System.IO.File]::ReadAllBytes($chunk.FullName) $outputFileStream.Write($chunkData, 0, $chunkData.Length) }} finally { $outputFileStream.Close()}
Things to know
- The tools mentioned here should work with most file types, including disk images, videos, audio, etc.
- You may want to store the split files in different locations for better management of storage space. If that's the case, make sure to move them to a single location before merging them together.
- When you merge split files together, by default they will merge in the source folder only but you can specify a different location if you want.
- Make sure to include filename extensions in your commands and scripts when using command line tools like Git Bash to split and combine files.
Member discussion