Windows 10: start line - end line to output file (BAT script)

Discus and support start line - end line to output file (BAT script) in Windows 10 Support to solve the problem; input.txt it is a text file with 10 lines in it one two three four five six seven eight nine ten i want to create a text file from line 3 to 7 it... Discussion in 'Windows 10 Support' started by Feuer, Sep 30, 2020.

  1. Feuer Win User

    start line - end line to output file (BAT script)


    input.txt
    it is a text file with 10 lines in it
    i want to create a text file from line 3 to 7
    it will be output.txt

    i want to know, how i can create a file that getting lines from another file with start line and end line arguments with a batch script?

    it was just an example
    i have a file with over 200 lines in it, i want to get 54 lines from it and make an output file

    more command; you can skip lines so you can set a start line, i will skip 2 lines with this command, the output file starts with 3rd line, but i do not know how i can give an end line

    more /e +2 input.txt > output.txt

    :)
     
    Feuer, Sep 30, 2020
    #1

  2. BAT file/Script to find and replace files

    Hey all....

    Can someone help me make the BAT script in the 2nd post above to be able to use MORE than "1" file?
    As it currently is, you can only replace one particular file.

    For example, I want in the command line to be able to write two files or more, and the script will find and replace all those 2 or more named files.
    Thanks much.

    P.S.... Is there a GUI that does file searching and replacing?
    I've spent hours searching on the net, and the only thing I can find are "text" search/replace and this BAT command, not actual "file" replacing. I find this amazing. *Frown start line - end line to output file (BAT script) :(
     
    leeuniverse, Sep 30, 2020
    #2
  3. BulldogXX Win User
    I want to add a comma at the end of every line

    • Click anywhere in the first line.
    • Press the End button on your keyboard.
    • Press the comma button on your keyboard.
    • Press the downward pointing arrow on your keyboard.
    • Press the End button on your keyboard.
    • Press the comma button on your keyboard.
    • Repeat steps 4 - 6 over and over until you reach the last line.
    If adding a comma at the end of a line causes the line to wrap, adjust the number of words in the line.
     
    BulldogXX, Sep 30, 2020
    #3
  4. Lucasonas Win User

    start line - end line to output file (BAT script)

    BAT file/Script to find and replace files

    FordGT90Concept!!!

    Your attachment is very close, it kept all the 5 numerals intact, but like you said: "it will rename them all from "#_Example_720p.zip" to "RAT_Example_#_24f_ONO.zip"...

    Greetings, Streetfighter 2

    I can't seem to get the BAT to work, but I'll still keep on trying.


    Any other suggestions, or BAT scripts Streetfighter & FordGT90Concept?
     
    Lucasonas, Sep 30, 2020
    #4
Thema:

start line - end line to output file (BAT script)

Loading...
  1. start line - end line to output file (BAT script) - Similar Threads - start line end

  2. Black vertical lines in the start.

    in Windows 10 Customization
    Black vertical lines in the start.: Hi, I am using Lenovo Think Pad Laptop. Black Lines are coming at the time of start and than the application starts.fine. I am using windows 10. Please help . Its a brand new laptop and its really irritation to see those black lines....
  3. Script to add the contents clipboard on a particular line of ini file

    in Windows 10 Support
    Script to add the contents clipboard on a particular line of ini file: I have O&O Registry Editor. It uses an ini file, to remember the last opened registry key. I would like to have a script that would copy the contents of the clipboard to the line called: LastAddress= I've researched modifying ini files, but don't know the way to copy &...
  4. How to compare files with different line endings

    in Windows 10 Network and Sharing
    How to compare files with different line endings: I have two versions of a software package. These are php files so normally I compare them with the directory compare function of Winmerge. However, in this case on of the two has Windows line endings crlf and the other unix lf. So Winmerge concludes that every line is...
  5. Line in is outputting to both rear line out and front line out

    in Windows 10 Ask Insider
    Line in is outputting to both rear line out and front line out: How do I prevent it from outputting to both? I want to switch outputs based on the current output device selected. Muting line in under speaker properties mutes it for both. I had "Listen to this device" checked before and muted the speaker and manually changed the output...
  6. Windows 10 taskbar refresh from command line or BAT file.

    in Windows 10 Performance & Maintenance
    Windows 10 taskbar refresh from command line or BAT file.: So, I have a task that I run that restarts a program every time I log on, switch to a user, etc. I notice that it leaves the icon from the previous instance of the program in the Taskbar Notification area. When I click on the arrow, and mouse over the icon, it quickly...
  7. Deleting files with command line

    in Windows 10 Network and Sharing
    Deleting files with command line: I used del filename and it was successfully deleted. I also used dir to double check. However, when I checked the Recycle Bin; the file wasn't found inside. Was this file permanently deleted?...
  8. Line by line diff (file comparison) with HTML/RTF export

    in Windows 10 Software and Apps
    Line by line diff (file comparison) with HTML/RTF export: Hello everyone Can anyone recommend a program that can compare two text files, line by line, and output the difference (preferably character differences) to a format that can be opened in MS Word, e.g. DOC, RTF or HTML? I need a tool that will compare each line from file 1...
  9. lines

    in Windows 10 Gaming
    lines: what cause a horizontal line across my screen. it start as a dot then start to spread https://answers.microsoft.com/en-us/windows/forum/all/lines/58effdf6-25d5-4386-8f0f-1e2365c628ea
  10. 32Gb Notebook - end of the line for Windows 10?

    in Windows 10 Support
    32Gb Notebook - end of the line for Windows 10?: I have not upgraded many of these devices but the method I've described previously has worked for me *Wink It helps too if the user does not run the system until the memory available runs low, before they add extra memory, as most Phones Tablets and these hybrid devices...