In some cases, you have to split large files into multiple files. How to split large files into multiple parts? Here, Partition Magic offers 3 easy to use tools to split large files into multiple files.
Why Split Large Files into Multiple Files
For some reason, you need to split large files into multiple parts. For instance, if a single file is larger than 4GB, you can’t save it in an FAT32 partition. Besides, if you transfer a large file (over than 4GB) to an FAT32 partition, you can receive the “file is too large for the destination file system” error.
Additionally, you will encounter similar file size limitations in Messengers, Email, and other services. To bypass the error and limit, you can split files into multiple files. Here comes the question: how to split large files into multiple parts? Well, this post provides you with some methods.
MiniTool Partition Wizard FreeClick to Download100%Clean & Safe
How to Split Large Files into Multiple Parts
In this section, I will show you how to split larger files into smaller parts using PowerShell, Git Bash, and WinRAR respectively. According to your preference, choose one way to complete the splitting operation.
Method 1: Use PowerShell
PowerShell is a built-in utility on Windows PCs, allowing you to perform tasks by running command lines. In this scenario, you can use it to split large files into multiple parts. Here’s how to do that.
Step 1: Right-click the Windows icon and choose Windows PowerShell (Admin).
Step 2: In the elevated User Account Control window, click Yes to confirm the operation.
Step 3: In the PowerShell window, type cd path and hit Enter.
Step 4: Execute the following script in PowerShell. You should replace “MyFile.ext” with the full file path (including the extension) of the large file. Besides, replace “10MB” with the size you want to set for the file. Then PowerShell will split the large file into multiple files and save them in the same folder as the original file.
$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()
}
Step 5: To merge multiple files into one, run the script below instead. Replace “RecombinedFile.ext” with the resulting file name, “PATH” with where the chunks are located, and “MyFile.mp4” with the chunk names.
$outputFile = “RecombinedFile.ext”
$chunkFiles = Get-ChildItem -Path “PATH” -Filter “MyFile.mp4_Chunk_*” | Sort-Object Name
if (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()
}
Method 2: Use Git Bash
Like Windows PowerShell, Git Bash is also a command-line tool. It enables you to split large files into multiple parts using command lines. The following steps show you how to split large files into multiple files via Git Bash.
Step 1: Go to the official website of Git Bash and download a suitable version according to your situation.
Step 2: Install Git Bash by following on-screen instructions.
Step 3: Open File Explorer by pressing Windows and E keys. Then access the folder which contains the large file.
Step 4: Within the folder, right-click blank area and choose Open Git Bash here.
Step 5: In the elevated window, type split -b 10M MyFile.ext SplitFile_ and hit Enter. After that, Git Bach will split large files into multiple files.
Step 6: To combine these files back into one file, run the command below in Git Bash. Replace “SplitFile_” with the prefix you used when splitting the file and “OriginalFile.ext” with the name and extension of the result file.
cat SplitFile_* > OriginalFile.ext
Method 3: Use WinRAR
How to split larger files into smaller parts? You can use a third-party tool like WinRAR. Being one of the most popular file compression and archiving tool, WinRAR can also split large files into multiple files. Download WinRAR from its official website and then install it on your computer.
Then launch the software and follow the steps below to split large files into multiple files.
Step 1: Open File Explorer, right-click on the file to split, and select WinRAR > Add to archive.
Step 2: By default, the Archive format is set to RAR. Even so, you can choose ZIP according to your preference.
Step 3: As for compression method and dictionary size, follow the default settings. Specify the desired file size in the Split to volumes size drop-down menu. You are allowed to choose the unit for the file size. If necessary, add a password to protect your archive.
Step 4: Finally, click OK to save changes. Depending on the file size, the process will take some time. You need to wait patiently. The split archives will be named part1, part2, part3, part4, etc.
In Conclusion
This post tells you why and how to split large files into multiple parts. If you want to split large files into multiple files, refer to the given methods in the post.