English 中文(简体)
投管处将数份档案复制到1份档案
原标题:In MS DOS copying several files to one file
  • 时间:2011-07-20 15:36:31
  •  标签:
  • dos

我试图把档案中若干个文件夹起来,并将所有这些档案和其中的信息合并成一个使用MS DOS的档案。 任何建议?

最佳回答
copy *.csv new.csv

No need for /b as csv isn t a binary file type.

问题回答
copy /b file1 + file2 + file3 newfile

每一来源档案必须添加到附有<代码>+的影印机上,所列最后一份档案名称将是所压缩数据被复制的地方。

如果是打字稿的一部分(.bat file),而且你有大量的档案清单,你可以使用多线<代码>>^<>/code>和任择/Y旗帜,以压制你想要推翻现有目的地档案。

REM Concatenate several files to one
COPY /Y ^
    this_is_file_1.csv + ^
    this_is_file_2.csv + ^
    this_is_file_3.csv + ^
    this_is_file_4.csv + ^
    this_is_file_5.csv + ^
    this_is_file_6.csv + ^
    this_is_file_7.csv + ^
    this_is_file_8.csv + ^
    this_is_file_9.csv ^
        output_file.csv

这比在一条线上指挥。

type data1.csv > combined.csv
type data2.csv >> combined.csv
type data3.csv >> combined.csv
type data4.csv >> combined.csv

etc.

假设你使用没有头盔的档案和所有档案都有相同的栏目。

档案名称必须加以正确分类,以便正确结合!

file1.bin file2.bin ... file10.bin 顺利工作

file01.bin file02.bin ... file10.bin will work properly

c:>for %i in (file*.bin) do type %i >> onebinary.bin

a. 用于二或二元文档。

for %f in (filenamewildcard0, filenamewildcard1, ...) do echo %f >> newtargetfilename_with_path

类似Mike T的想法;在MissyDog s 127个性指挥线限制下可能更好地工作





相关问题
Compilers for DOS32?

Where can I get BASIC and C/C++ Compilers for MS-DOS?

GUI paradigm history

I know that Apple and Microsoft were inspired by Xerox PARC in building the GUI, but my question is: from the hardware point of view, which was the switch to GUI become available? I remember that I ve ...

Batch File to Delete Folders

I found some code to delete folders, in this case deleting all but n # of folders. I created 10 test folders, plus 1 that was already there. I want to delete all but 4. The code works, it leaves 4 ...

Help with DOS script (grab specific data from a file)

I need to grab just the md5 value from a file and make it a variable which I can use to compare to another md5 value. The problem is this file looks like this: a7393f772e34ca16a5854e80d9ec6704 md5 ...

DOS Database - help needed to recognize what is it

today I got a copy of an old system from which I need to import data. The system is written in C and runs in DOS. It uses some kind of database. The file format seems to be rather simple(1 file = 1 ...

View ram in DOS

Is there a way in dos (im using a dos boot disk on a linux machine) to view portions of ram? ie. some form of command to read the binary at a given address? edit: my bootable floppy doesnt have ...

Lynx removes newline characters from post_data input

I am trying to post a file to a URL via the MS-DOS command prompt. I am using the Lynx browser to do this. I am able to post my file just fine, but all of the newline characters are removed by Lynx ...

热门标签