Splitting File based on size

Microsoft / Dos
June 15, 2010 at 06:40:39
Specs: Windows

I have a requirement to split a file into two if the filze size is >= 2GB. After I split also no file should exceed 2 GB and then need to zip all these files into 1 and upload. I am trying to figure out the batch script required to do this. Can you help me as this is bit urgent.

Thanks for your help.

See More: Splitting File based on size

June 15, 2010 at 14:54:28
There are no files bigger than 2G in DOS.

Helping others achieve escape felicity


Report •

June 15, 2010 at 14:56:11
... found this program HJSplit for MS DOS download

hjsplit -s[split size] <filename>

... any good?

copy /b part.001+part.002+part.003+part.004 joinedfilehere.exe


... Posting is provided "AS IS" with no warranties
Grrrr... ...im

Report •

June 15, 2010 at 22:50:28
Hi Mechanix2Go,

The file will be placed on a Windows server and a batch script should go and check the file size and then process as I described above. Sorry if I have misleaded. The requirement is to write the batch script to check the size and split in the windows server.

Please advice, suggest.


Report •

Related Solutions

June 15, 2010 at 23:22:03
Did you try the util suggested in #2?

I don't know any way to split with batch. [only batch]

Helping others achieve escape felicity


Report •

June 16, 2010 at 00:17:08
Hi Mechanix2go,

I don't think I will be allowed to install external softwares into dev/production enterprise servers.

We use ETL tool to generate the flatfile and this sits on a Windows server. From ETL tool I can call any dos based command or script. Hence wanted to write a script which will do this split process based on size.

Any suggestion pls?

Report •

Ask Question