比如,output.txt 里有
06-11-21
我怎么把06-11-22放到06-11-21上面?
最后成为
06-11-22
06-11-21

解决方案 »

  1.   

    那么,使用什么语言?  DOS 命令?
      

  2.   

    DOS下如何将文本写到文件的顶部?
    另外怎么加回车换行符
      

  3.   

    echo sometext >> C:\VasErrorLog.txt
    这样只能把sometext追加到尾部
    我现在想把sometext放到头部
      

  4.   

    用copy命令
    把a.txt中的内容加到b.txt的上面
    copy a.txt+b.txt c.txt
      

  5.   

    echo sometext >> C:\VasErrorLog2.txtcopy C:\VasErrorLog2.txt + C:\VasErrorLog.txt   C:\VasErrorLog2.txt
      

  6.   

    最后应该写入第一个文件
    echo sometext >> C:\VasErrorLog2.txtcopy C:\VasErrorLog2.txt + C:\VasErrorLog.txt   C:\VasErrorLog.txt
    为什么会出现黑块一样的歌?
      

  7.   

    那是应该是文件结束符号,通过DOS命令,没有办法去掉的了
      

  8.   

    谢谢cangwu_lee(小橙子) ,不过我在本地测试 1.txt 里 AAA 2.txt里 BBB
    copy c:\2.txt + c:\1.txt c:\1.txt
    结果1.txt里只有BBB,原来的AAA不见了
    等会给你100分