Batch file 在批处理文件中存储大文件

Batch file 在批处理文件中存储大文件,batch-file,cmd,base64,certutil,Batch File,Cmd,Base64,Certutil,我试图创建一个批处理文件,将其中的一个或多个大文件存储为base64编码字符串,然后将它们转换回文件。我一直在遵循这个问题的第一个答案:但是我试图在这个批处理文件中存储一个~3mb的文件,当涉及到通过echo将文件源写回文件时,批处理文件似乎崩溃了。我看到一个弹出窗口,上面写着“Windows命令处理器已停止工作” 批处理文件一次性写入文件的数据量是否有限制 我正确地遵循了这个示例,只将file.tmp名称更改为filetest.tmp,但是这个批处理文件中大约有47000行,这可能是导致它崩溃

我试图创建一个批处理文件,将其中的一个或多个大文件存储为base64编码字符串,然后将它们转换回文件。我一直在遵循这个问题的第一个答案:但是我试图在这个批处理文件中存储一个~3mb的文件,当涉及到通过echo将文件源写回文件时,批处理文件似乎崩溃了。我看到一个弹出窗口,上面写着“Windows命令处理器已停止工作”

批处理文件一次性写入文件的数据量是否有限制

我正确地遵循了这个示例,只将file.tmp名称更改为filetest.tmp,但是这个批处理文件中大约有47000行,这可能是导致它崩溃的原因

你知道怎么解决这个问题吗


编辑:certutil对原始文件的编码速度相当快,因此我假设这部分不是问题所在。

我建议您查看我的二进制批处理编码程序的最新版本:;对于这种类型的编码,它有一系列非常有用的特性。这是帮助屏幕:

Create an installer Batch program for data files of any type

BINTOBAT [/T:.ext1.ext2...] [/L:lineSize] [/F[:fileSize]] filename ...

  /T:.ext1.ext2    Specify the extensions of text type files that will not be
                   encoded as hexadecimal digits, but preserved as text.
  /L:lineSize      Specify the size of output lines (default: 78).
  /F[:fileSize]    /F switch specify to generate a Full installer file.
                   The optional fileSize specify the maximum output file size.

BinToBat encode the given data files as hexadecimal digits (or preserve they
as compressed text) and insert they into InstallFiles.bat program; when this
program run, it generates the original data files.

You may rename the InstallFiles.bat program as you wish, but preserving the
"Install" prefix is suggested.

You may use wild-cards in the filename list.

If the /F switch is not given, a Partial installer is created:
- You may insert a short description for each file.
- You may insert divisions in the file listing via a dash in the parameters.
- The installer allows to select which files will be downloaded and ask
  before overwrite existent files.

If the /F switch is given, a Full installer is created:
- The installer always download all files.
- You may specify commands that will be executed after the files were copied.
- You may specify the maximum size of the output file via /F:fileFize, so in
  this case the output file will be divided in parts with a numeric postfix.

  If you use /F switch you can NOT rename the InstallFiles??.bat files; the
  first one is the installer and the rest just contain data.
这个程序已经成功地用15MB大小的文件进行了测试,这些文件在8-9分钟的合理时间内编码,提取速度更快。当然,这些时间取决于所使用的计算机