Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

From a Batch file, to show a file in a Window for linewise copy'n'paste ?

34 views
Skip to first unread message

John Stockton

unread,
Apr 15, 2022, 4:10:10 PM4/15/22
to
In some of my Batch files, I have something like :-

REM @start iexplore.exe %DIFF_TXT%
"C:\Program Files\Notepad++\notepad++" -ro %DIFF_TXT%

I use either the REM line or the Notepad++ alternative, to get a read-only GUI display of the file named (as *.TXT) by variable DIFF_TXT, so that I can then do selective manual copy'n'paste of lines from the file into a command prompt window.

I would like to use Windows Notepad, but that is not able, as far as I can see, to present an unalterable _view_ of the file. I don't know of any standard part of Windows that can do it.

Otherwise, I would like to call a routine, written in Batch, VBScript, or JScript, to do the job. I want something that creates a new window that looks different to any others likely to be already on the screen, and that shows as different on the TaskBar. I have, as examples, scripts for opening and reading a file, but nothing for the output part.

--
(c) John Stockton, near London, UK. Using Google Groups. |

Michael Haufe (TNO)

unread,
Apr 19, 2022, 1:05:58 AM4/19/22
to
You can create an *.hta file and open that. It will give you a read only view, the ability to have a custom icon, and will show up on the task bar if you configure the setting

JJ

unread,
Apr 19, 2022, 6:53:34 AM4/19/22
to
On Mon, 18 Apr 2022 22:05:53 -0700 (PDT), Michael Haufe (TNO) wrote:
>
> the ability to have a custom icon,

Pity that the icon can not be changed at runtime.

Michael Haufe (TNO)

unread,
Apr 21, 2022, 1:12:49 PM4/21/22
to
hmm, I never tried. I think HTAs run as the equivalent of IE7 in disguise. I'm assuming that feature wasn't available yet. I looked up P01's "Defender of the Favicon" [1] and I think it was broken in IE7. [2]

[1] <http://www.p01.org/defender_of_the_favicon/>
[2] See his comment on compatibility: <https://web.archive.org/web/20120102192029/http://ajaxian.com/archives/defender-of-the-favicon>

John Stockton

unread,
Apr 21, 2022, 1:42:37 PM4/21/22
to
On Tuesday, 19 April 2022 at 06:05:58 UTC+1, Michael Haufe (TNO) wrote:
> On Friday, April 15, 2022 at 3:10:10 PM UTC-5, John Stockton wrote:
> > In some of my Batch files, I have something like :-
> >
> > REM @start iexplore.exe %DIFF_TXT%

> You can create an *.hta file and open that. It will give you a read only view,
> the ability to have a custom icon, and will show up on the task bar if you
> configure the setting

So at present I am using Notepad++ -ro -alwaysOnTop -nosession
on *my* Win10 PCs (which all have Notepad++ and can be detected by a
pre-existing shibboleth in the root folder), and plain Notepad on others
(where I can be extra careful).

When Microsoft have sort-of-removed Internet Explorer at the middle of
June, I will cab try start iexplore.exe again. If that works, it may well
use a more congenial font.

The problem, if any, is solved, in at least two ways.

P.S.
I have just discovered that prompt>START MSEDGE works ...
and that
prompt>START MSEDGE file:\\c:\homepage\wiki.txt
opens wiki.txt. That is, at least, an acceptable alternative.
As I don't like Edge, a new Edge window can be made visible
by clicking the taskbar icon.

I've seen your message of "21 April 2022 at 18:12:49 UTC+1".

Härra Rabmo

unread,
Jul 6, 2022, 12:14:33 PM7/6/22
to
Hey guy. Would You want to get rich with me doing programming? If yes, call me !!!!!!!!!

✆☎☏📱📞 : 372 53900660

Härra Rabmo

unread,
Jul 6, 2022, 12:14:45 PM7/6/22
to
Hey guy. Would You want to get rich with me doing programming? If yes, call me !!!!!!!!!

✆☎☏📱📞 : 372 53900660


0 new messages