
[已解決]批處理比對兩個文本文件刪除相同的部分保留不同的部分最后由 thp2008 于 -3-30 10:11源文件1、AAA.txthttps://www.xigua.com/view_video.php?view=m604a630edd040https://www.xigua.com/view_video.php?view=m60261926f38a5https://www.xigua.com/view_video.php?view=m5fdcb7249a004https://www.xigua.com/view_video.php?view=m5e80d9ed27871https://www.xigua.com/view_video.php?view=m5f9c775cb3dc1https://www.xigua.com/view_video.php?view=m6057900f86d5ehttps://www.xigua.com/view_video.php?view=m5f7f16b208e42https://www.xigua.com/view_video.php?view=m60271ee9c3642https://www.xigua.com/view_video.php?view=m605cd58a890b3https://www.xigua.com/view_video.php?view=m60030a961e34ahttps://www.xigua.com/view_video.php?view=m604e3a822dd61https://www.xigua.com/view_video.php?view=m5f70cc4b8f31bhttps://www.xigua.com/view_video.php?view=m6055ce153a579https://www.xigua.com/view_video.php?view=m6031dad48532bhttps://www.xigua.com/view_video.php?view=m5e29b1373d0f1https://www.xigua.com/view_video.php?view=m6044dd19361f6........................此處省略N行2、需要對比的文件BBB.txthttps://www.xigua.com/view_video.php?view=m604a630edd040https://www.xigua.com/view_video.php?view=m60299e235b243https://www.xigua.com/view_video.php?view=m60417e1fd4156https://www.xigua.com/view_video.php?view=m5f7f16b208e42https://www.xigua.com/view_video.php?view=m60383bd87b094https://www.xigua.com/view_video.php?view=m6038f35c2a72ehttps://www.xigua.com/view_video.php?view=m5fdcb7249a004https://www.xigua.com/view_video.php?view=m6024535c84794..........................此處省略N行我需要將BBB.txt跟源文件AAA.txt的內容進行比較,整行進行比較,忽略大小寫。要求:1、如果BBB.txt中的內容,有跟源文件相同的部分,請將相同的行顯示出來,不要顯示AAA.txt,只要顯示BBB.txt,就好了。暫停一下,等我確認一下。然后從BBB.TXT中刪除跟源文件AAA.txt中相同的行。(不要對源文件AAA.txt有任何操作,源文件AAA.txt只用于比對源)2、上一步完成后,檢查一下BBB.txt中是否有空行,將空行刪除,然后BBB.txt和AAA.txt的全部行進行合并,合并后的新文件為ccc.txt.(不要對源文件AAA.txt有任何操作,源文件AAA.txt只用于合并源)如果第三方命令行工具,更好用,更高效的話,也可以使用第三方命令行。如果沒有,使用批處理也可以,PowerShell也行(如果是PowerShell,請寫成CMD格式)萬分感謝!

