How to delete two columns in the txt file in batch processing

Reported answer
How to delete two columns in the txt file in batch processing
Ask online customer service
Scan the code to ask online customer service
  • Number of answers

    five

  • Number of browses

    9,235

5 answers Default sorting
  • Default sorting
  • Sort by time

Adopted
You can put the txt file
Copy the content of to EXCEL, and then delete the first two lines in EXCEL easily
Finally, put the last line in the txt file
cancel comment
The reference method is as follows:
1. Right click on the desktop mouse to create a text document;
2. Enter the command in Notepad:

@Echo off echo Clearing system garbage files, please wait del /f /s /q %systemdrive%\*.tmp del /f /s /q %systemdrive%\*._mp del /f /s /q %systemdrive%\*.log del /f /s /q %systemdrive%\*.gid del /f /s /q %systemdrive%\*.chk del /f /s /q %systemdrive%\*.old del /f /s /q %systemdrive%\recycled\*.* del /f /s /q %windir%\*.bak del /f /s /q %windir%\prefetch\*.* rd /s /q %windir%\temp & md %windir%\temp del /f /Q% userprofile% cookies *. * del/f/q% userprofile% recent *. * del/f/s/q% userprofile% Local Settings Temporary Internet Files *. * del/f/s/q% userprofile% Local Settings Temp *. * del/f/s/q% userprofile% recent *. * echo Clearing system garbage is complete! echo. & pause

3. Click File - Save As;

4. Change the file extension to. bat, and then click OK to save. This completes the creation of a simple batch file.
cancel comment
C1=echo &B1&&A1&.txt
drop-down
Create a new notepad file, copy the contents in column C, and change the suffix ". txt" of notepad to ". bat" to a batch file. Place the batch file in the same directory as the TXT file to be generated, and double-click to execute.

Note: The command will add B1 content to the A1.txt file. If there is no such file, one will be created.
cancel comment
Vba is very convenient.
Read the private letter.
cancel comment
According to Parno's reminder, the startup is achieved.
I myself have modified the satisfactory answer according to the help provided by binnycar:
@echo off
:loop
echo %time%
set findstr %%~nxi') do (
echo.
echo --------------------------------
Echo file name:%%~nxi
Echo Creation time:%% j%% k
Echo exception information:
type %%l
echo.
)))
Echo The information is being updated. Please wait. Don't close this window. Thank you!
ping /n %pnum% 127.1 nul
ping 127.1 -n 3 1nul
%0
echo %time%
goto loop
There are many superfluous things in the above batch processing. My layman needs to change slowly. The information about refreshing the file every two seconds has been added, and the content of the txt file can be displayed. The batch processing continues to run so that it can be displayed on the desktop, but it still does not meet the requirement of only displaying the latest 10 file information. I will study it again.
cancel comment
ZOL Q&A > Barcode printer > Other classifications > How to delete two columns in the txt file in batch processing

report

Thank you for contributing to the harmony of the community. Please select the type of report

Reported successfully

It will be handled after verification
Thank you for your contribution to community harmony

Scan the code to participate in the trial of new products at 0 yuan
You can get the sheets and grand gifts on the top floor

 Scan and pay attention to us
Tips

Are you sure you want to cancel this registration and exit this activity?