0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

1個のファイルをN回結合するwindowsのバッチ

Last updated at Posted at 2015-04-21

1個のファイルの結合をN回繰り返すバッチファイルを作成しました。

使用方法

makebigfile.bat 入力ファイル名 出力ファイル名 繰返し回数

使用例

makebigfile.bat と同じフォルダに infile.txt があり、
10回のappendを繰返し、outfile.txtに出力する場合。

$ makebigfile.bat infile.txt outfile.txt 10

------cut here begin------
@echo off
pushd %~dp0

type nul > %2
for /L %%i in (1,1,%3) do (
copy %2 + %1 tmp.txt
copy tmp.txt %2
)
del tmp.txt
popd
------cut here end------

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?