Page 1 of 1
The command line to open a txt file and point the cursor to End of file (EOF)
Posted: 09 Sep 2022 00:33
by KSKwin123
I have a batch file will execute some task and it will open the text file.
Now, i want the cursor to set at end of the File (Opened Text file)
_KSK
Re: The command line to open a txt file and point the cursor to End of file (EOF)
Posted: 09 Sep 2022 01:33
by aGerman
As I already told you in your other question about the UAC prompt, Batch is not able to interact with graphical user interfaces. You can't emulate mouse- or keyboard actions.
Steffen
Re: The command line to open a txt file and point the cursor to End of file (EOF)
Posted: 09 Sep 2022 05:19
by miskox
Your file we be opened in notepad so you can use CTRL+END. If this is not what you want see aGerman's reply.
Saso
Re: The command line to open a txt file and point the cursor to End of file (EOF)
Posted: 09 Sep 2022 08:08
by Aacini
I assume you want to set the
file pointer to End Of File in order to
append new information to the file. If so, then use
>> append redirection:
Code: Select all
(
echo New information
echo More new information
) >> theFile.txt
Note: previous example are commands given at
the command line that
open a text file and point the "cursor" (File Pointer, really) to End of file, exactly what you requested...
Antonio