Page 1 of 1

DOS: Open Text File and have the Cursor @ the End of File

Posted: 02 Aug 2011 19:07
by FirstBorn
Hi,

Thank you for your help.

Had to build a PC to use 'cuz My Old PC when "Ka-put!"

So, Have to use Vista instead of XP.

Vista does NOT allow (Well, THIS PC, at least) to use .LOG
at the beginning of a Text file to Time and Date Stamp
the file upon opening...

SO, I wrote a Batch File to do this FOR Me,
but, can't get the file to open w/ the Time and Date stamp,
having the Cursor at the End of the File.

I've attached the code here for the Example of what I'm doing.

Any Ideas on what I'm doing wrong or what I'm missing?

Thank You VERY MUCH for Your Help in Advance!

Thanks!

Code: Select all

ECHO %DATE% %TIME% >> FileName.txt

START filename.txt &GOTO:EOF
REM &GOTO:EOF and GOTO:EOF or GOTO EOF does not work

Re: DOS: Open Text File and have the Cursor @ the End of Fil

Posted: 03 Aug 2011 01:21
by trebor68
The code that you write will have two command in one row.
command 1: start filename.txt
command 2: goto :eof

Command 1 will open the file filename.txt with the text editor (standard: notepad).
Command 2 will go to the end of the batch (bat-file or cmd-file).

The program notepad have not a option, that will set the cursor to the end of the file.

With the program EditPad is this in the "Pro" version possible. Not possible in the "Light" version.

If you use the program EditPad for TXT files, you can use the following command:

Code: Select all

EditPad /l-1 filename.txt

Re: DOS: Open Text File and have the Cursor @ the End of Fil

Posted: 03 Aug 2011 01:30
by FirstBorn
Thank you trebor68 Very Much for your help!

I REALLY Appreciate it!