How to implement the bat that writes the txt file name to the first line of the file
This article is about how to implement bat that writes the txt file name to the first line of the file. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
The code is as follows:
@ echo off&color 0f&setlocal enabledelayedexpansion
Echo.
Echo.
Echo.
Set "masks 0"
Set/p m = initial value =?
Echo.
Set "Xero1"
Set/p x = incremental value added =?
Echo.
Set "Yellow2"
Set/p y = valid value =?
Echo.
Does set/p= want to clear the previous renaming list [?] Enter Y to clear, and any other values are retained. Old.txt
Copy / b old.txt + "% ~ nxi"! nulli.txt > nulling echoechoechoechoechoechograms of list.txt.% roomni > > list.txt
Rem delete the "rem" before the following sentence if you want to delete the original file.
Rem del / Q / f "% ~ nxi"
))
Del old.txt
Directly run bat enter is OK, if there is a special need, you can output the initial value and other information
Thank you for reading! On "how to write the txt file name into the first line of the bat" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, you can share it out for more people to see it!