Search found 174 matches

by siberia-man
24 Oct 2016 14:22
Forum: DOS Batch Forum
Topic: Redirect STDOUT to GUI
Replies: 11
Views: 4551

Re: Redirect STDOUT to GUI

Oh. In your initial post you were writing that much about displaying the text in a browser so I thought one of your goals was to generate a proper output. Yes. Our concern is just capture output and invoke the proper GUI application. Once we run some command (or chain of commands) we know the forma...
by siberia-man
24 Oct 2016 12:41
Forum: DOS Batch Forum
Topic: Redirect STDOUT to GUI
Replies: 11
Views: 4551

Re: Redirect STDOUT to GUI

Ok. I have updated the script in the first post of this topic. Now it is more flexible now: command | 2 html.txt The code above does work properly in any case -- if the file "2.html.bat" does or doesn't exist. This works for other associated extensions (not html only). Thank you, Steffen, ...
by siberia-man
24 Oct 2016 12:04
Forum: DOS Batch Forum
Topic: Redirect STDOUT to GUI
Replies: 11
Views: 4551

Re: Redirect STDOUT to GUI

It however doesn't solve the encoding issue It shouldn't be solved at all. If you really want to see something as a plain text in browser you need to pass it through another filter to add html-tags and replace some unprintable entities. update: type z-utf.txt ÄÖÜäöüß type z.bat @echo off <nul set /...
by siberia-man
24 Oct 2016 09:36
Forum: DOS Batch Forum
Topic: Redirect STDOUT to GUI
Replies: 11
Views: 4551

Re: Redirect STDOUT to GUI

That returns "Bad invocation" I see your point. I have the file "2.html.bat" configured to launch FF for html output. You don't. So the following invocation does work in my case and doesn't work in yours: assoc /? | 2 html.txt I am going to rework the script (I think it is good ...
by siberia-man
24 Oct 2016 09:06
Forum: DOS Batch Forum
Topic: Redirect STDOUT to GUI
Replies: 11
Views: 4551

Re: Redirect STDOUT to GUI

Of course, displaying of a plain text in a browser is not good idea because of the reasons you hvae mentioned. But you could do the following thing: assoc /? | 2 html.txt A browser is fine for html output like below (let's assume there is some useful command that outputs real HTML page): echo ^^^<h1...
by siberia-man
23 Oct 2016 17:09
Forum: DOS Batch Forum
Topic: Redirect STDOUT to GUI
Replies: 11
Views: 4551

Redirect STDOUT to GUI

Introduction You can call me insane but I did it and would like to share it with you. The idea and first implementation have appeared few years ago. Initially I was needed to forward output of some commands directly into my favorite browser. During all this time it was improved many times (become s...
by siberia-man
04 Oct 2016 14:08
Forum: DOS Batch Forum
Topic: tobat.bat (Part of the BatFramework) - Drag and drop a file and turn it into batch
Replies: 28
Views: 13237

Re: tobat.bat (Part of the BatFramework) - Drag and drop a file and turn it into batch

Sorry, if I posted the message in wrong thread. I have thought this is discussion about the BatFramework.

And, yes. Confirm that my example has a bug as it was mentioned early. The better way is to escape extra parentheses.
by siberia-man
04 Oct 2016 08:41
Forum: DOS Batch Forum
Topic: tobat.bat (Part of the BatFramework) - Drag and drop a file and turn it into batch
Replies: 28
Views: 13237

Re: tobat.bat (Part of the BatFramework) - Drag and drop a file and turn it into batch

numcheck.bat: do it easier

Code: Select all

if "%~1" == "" (
   echo:EMPTY VALUE
) else (
   set /a "val=%~1" 2>nul
   if "%val%" == "%~1" (
      echo:NUMBER: [%~1]
   ) else (
      echo:NOT A NUMBER: [%~1]
   )
)
by siberia-man
04 Sep 2016 01:26
Forum: DOS Batch Forum
Topic: Creating a script to gather PC information - to assist those asking for help
Replies: 161
Views: 75744

Re: Creating a script to gather PC information - to assist those asking for help

Do you mean this one?

Elevated Admin=Yes, Admin group=Yes


Yes. That's right.
by siberia-man
02 Sep 2016 01:01
Forum: DOS Batch Forum
Topic: Creating a script to gather PC information - to assist those asking for help
Replies: 161
Views: 75744

Re: Creating a script to gather PC information - to assist those asking for help

Hi Steffen, I was able to run your script. It have launched notepad with the following output: -------------------------------------------------------------------------------- Windows version : Microsoft Windows [Version 6.1.7601] Product name : Windows 7 Enterprise, 64 bit Performance indicators : ...
by siberia-man
01 Sep 2016 14:48
Forum: DOS Batch Forum
Topic: Creating a script to gather PC information - to assist those asking for help
Replies: 161
Views: 75744

Re: Creating a script to gather PC information - to assist those asking for help

Flasher from Russian forum reports the same result and the script works a bit longer.
by siberia-man
01 Sep 2016 00:50
Forum: DOS Batch Forum
Topic: Creating a script to gather PC information - to assist those asking for help
Replies: 161
Views: 75744

Re: Creating a script to gather PC information - to assist those asking for help

aGerman wrote:Thank you siberia-man and thanks to the helpers at script-coding.com!
Большое спасибо!


You are welcome!
Пожалуйста!
by siberia-man
21 Jul 2016 09:27
Forum: DOS Batch Forum
Topic: js/vbs/html/hta and more hybrids and chimeras in cmd/bat
Replies: 61
Views: 174773

Re: js/vbs/html/hta hybrids and chimeras in cmd/bat

The script was updated: http://www.dostips.com/forum/viewtopic.php?f=3&t=5543&p=37780#p37780.
After this thread We can use bash in our scripts now in Win10 I decided to add (the variant with heredoc) the support of hybrid of Bash in Cmd.
by siberia-man
20 Jul 2016 01:19
Forum: DOS Batch Forum
Topic: heredoc in batch
Replies: 5
Views: 6321

Re: heredoc in batch

I've tested your example. In fact, it doesn't work because you try to call the script by name and extension .bat . Try the same without extension. C:\>type z.bat @ECHO OFF CALL heredoc :testlabel1 & GOTO :testlabel1 SET DataFile=users.txt @ECHO BEGIN ---------------------------------------------...
by siberia-man
19 Jul 2016 00:00
Forum: DOS Batch Forum
Topic: heredoc in batch
Replies: 5
Views: 6321

Re: heredoc in batch

Hi mirrormirror , There is error that comes from the line 60 of the heredoc.bat script. Most probably you have entered error while copying from the forum. Please check that you have stored the script correctly. You can take this from the repository https://github.com/ildar-shaimordanov/cmd.scripts/b...