Batch file to delete first 3 lines of a text file
问题 As the title states I need a batch file to delete the FIRST 3 lines of a text file. for example: A B C D E F G in this example I need A,B and C deleted along with the line 回答1: This should do it for /f "skip=3 delims=*" %%a in (C:\file.txt) do ( echo %%a >>C:\newfile.txt ) xcopy C:\newfile.txt C:\file.txt /y del C:\newfile.txt /f /q That will re-create the file with the first 3 lines removed. To keep the user updated you could integrate messages in the batch file in vbscript style or output