You are not logged in.
I want add two files writing a batch script. In Linux we can write like : cat file1 file2 > file3. I want to do similar thing in windows batch script. please help me.
Offline
The batch equivalent of cat is type. You can use it the same way, although type file1 file2 output looks like
file1
<contents of file1>
file2
<contents of file2>
If you don't want headers, you can do
type file1 > file3
type file2 >> file3
just like in Linux.
Offline
... or:
(type file1 & type file2) > file3
You may also develop your own cat.bat file, like this one:
@for %%a in (%*) do @type %%a
... and then do:
cat file1 file2 > file3
Offline