Wikipedia:Reference desk/Archives/Computing/2022 October 18

= October 18 =

Split file in Windows?
In Linux I can use the command  to split a large file into pieces which can later be rejoined with   to form an exact, byte-for-byte copy of the original file. How can I do this in Windows? It needs to work for binary files too, not just plain text files. J I P &#124; Talk 13:31, 18 October 2022 (UTC)
 * Can you use WSL? — Preceding unsigned comment added by 12.116.29.106 (talk) 16:30, 18 October 2022 (UTC)
 * I haven't used it for this myself, but apparently 7-Zip can do this (Split file... under the File menu). AndrewWTaylor (talk) 16:45, 18 October 2022 (UTC)


 * We have a marginally helpful article file spanning. Winrar can produce a multi-part rar archive, and can be used via the command line, if that serves your purpose. Or you could obtain a hex editor, and split or recombine files by means of copy and paste. Card Zero  (talk) 16:51, 18 October 2022 (UTC)
 * My solution would be to install cygwin which lets you use  itself, along with most of the other Linux tools. CodeTalker (talk) 18:34, 18 October 2022 (UTC)
 * The suggestion above to use WSL would be similar and not require installing a separate program, assuming that WSL is available. I have it. I just selected it from the options in Windows. But, I know some IT shops block it so employees don't do anything weird with those crazy Linux commands. 97.82.165.112 (talk) 22:57, 18 October 2022 (UTC)
 * @CodeTalker As someone once cheekily recounted:  User 1:  "I need to solve problem X".  User 2:  "Just (install Perl, or use regular expressions, etc.)."  Now they have two problems.  https://blog.codinghorror.com/regular-expressions-now-you-have-two-problems/ David10244 (talk) 07:03, 19 October 2022 (UTC)
 * See also xkcd 208. --174.95.81.219 (talk) 21:03, 19 October 2022 (UTC)
 * I have used this successfully. There is a joiner too. https://pinetools.com/split-files --TrogWoolley (talk) 10:40, 19 October 2022 (UTC)


 * 7-Zip worked perfectly for my needs. I'm just amazed Windows does not offer a tool for such a basic task by default. J I P  &#124; Talk 22:18, 19 October 2022 (UTC)
 * A Web search for "powershell split file" seems to indicate that Windows Powershell, which is a part of modern Windows, can do this natively. You have to use a slightly verbose "script" since Powershell is based on .NET and is designed around calling .NET "primitives" rather than the often more complex programs typical for Unix shells, but you can copy an existing one and save it in a file and then just run that. --47.147.118.55 (talk) 04:12, 21 October 2022 (UTC)