Search found 174 matches

by siberia-man
14 Feb 2021 04:39
Forum: DOS Batch Forum
Topic: How to use the output of my first command in my second command in one step?
Replies: 5
Views: 2111

Re: How to use the output of my first command in my second command in one step?

Create a batch script with this content: @echo off setlocal set "reg_key=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.docx\UserChoice" for /f "tokens=1,2,3" %%a in ( ' reg query "%reg_key%" ' ) do if /i "%%~a" == "Progid" ( vboxcontrol guestproperty set /mypropertie...
by siberia-man
13 Feb 2021 07:49
Forum: DOS Batch Forum
Topic: js/vbs/html/hta and more hybrids and chimeras in cmd/bat
Replies: 61
Views: 174675

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

What has been done -- some improvements to the PowerShell chimera creation -- support Ruby The full list of supported languages and technologies -- JavaScript -- VBScript -- Perl -- Shell/Bash -- PowerShell -- Python -- Ruby -- HTA -- HTML -- WSF -- KixStart -- AutoIt, AutoHotKey -- PHP -- Julia So...
by siberia-man
25 Nov 2020 04:26
Forum: DOS Batch Forum
Topic: ansi.bat: handling ANSI sequences in nowadays WIN terminals
Replies: 8
Views: 2900

Re: ansi.bat: handling ANSI sequences in nowadays WIN terminals

@aGerman

Dave said:
aGerman discovered that CSCRIPT can enable the escape sequences simply by running an innocuous PowerShell command
Steffen, is it your personal finding? Or it was found somewhere in the Internet?
by siberia-man
24 Nov 2020 10:19
Forum: DOS Batch Forum
Topic: ansi.bat: handling ANSI sequences in nowadays WIN terminals
Replies: 8
Views: 2900

Re: ansi.bat: handling ANSI sequences in nowadays WIN terminals

enable the escape sequences simply by running an innocuous PowerShell command Cool trick! I've just tested it with wsx.bat , my own REPL tool announced here https://www.dostips.com/forum/viewtopic.php?f=3&t=9476&hilit=wsx. And it works. Here is the example. It's long one-liner separated into few su...
by siberia-man
24 Nov 2020 07:00
Forum: DOS Batch Forum
Topic: ansi.bat: handling ANSI sequences in nowadays WIN terminals
Replies: 8
Views: 2900

ansi.bat: handling ANSI sequences in nowadays WIN terminals

A few days ago i found out that windows terminal supports ANSI sequences. It's cool, of course. However, as it's usual in Windows world, every cool feature has worse things. VT is off, by default. Luckily, it can be turned on easily. ENABLE/DISABLE Turn on: reg add HKCU\Console /v VirtualTerminalLev...
by siberia-man
30 Oct 2020 08:49
Forum: DOS Batch Forum
Topic: Determine Yes/No/All string for current locale
Replies: 17
Views: 7744

Re: Determine Yes/No/All string for current locale

You might want to include space in the delimiter list if you want the entire word without trailing space. Trailing spaces are already trimmed in the separate section of the script. I didn't include the space in the delimiter list because it would be too hard to parse the string. Even more, I am not...
by siberia-man
29 Oct 2020 17:00
Forum: DOS Batch Forum
Topic: Determine Yes/No/All string for current locale
Replies: 17
Views: 7744

Re: Determine Yes/No/All string for current locale

At least this one covers both English (WIN10) and Russian (XP and WIN10) versions. Based on my results I can suppose that it could cover others as well. At least in the frame of the supported formats: @echo off setlocal set "ans_yes=" set "ans_no=" set "ans_all=" copy /y nul zzz >nul for /f "tokens=...
by siberia-man
29 Oct 2020 10:24
Forum: DOS Batch Forum
Topic: A killer : in a comment
Replies: 15
Views: 4180

Re: A killer : in a comment

Does that post in Russian have to do with the current discussion? http://forum.script-coding.com/viewtopic.php?pid=80608#p80608 Briefly... Content in comments is able to cause a syntactic (captured) error. set a=1 rem comment %a:=% set a=1 :: comment %a:=% The "::" comments are parsed as well as the...
by siberia-man
29 Oct 2020 00:33
Forum: DOS Batch Forum
Topic: Determine Yes/No/All string for current locale
Replies: 17
Views: 7744

Re: Determine Yes/No/All string for current locale

It doesn't work in Russian (XP and WIN10) yes = да no = No all = нет yes character = д no character = N all character = н because >copy /-y nul zzz <nul Скопировано файлов: 1. >copy /-y nul zzz <nul Заменить zzz [Yes (да)/No (нет)/All (все)]: Скопировано файлов: 0. UPDATED: Russian words for Yes/No/...
by siberia-man
23 Sep 2020 10:32
Forum: DOS Batch Forum
Topic: js/vbs/html/hta and more hybrids and chimeras in cmd/bat
Replies: 61
Views: 174675

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

The latest to this moment version of the script. What has been done -- some cosmetic changes -- improve slightly the argument processing -- add hybridization for AutoIt, AutoHotKey and PHP -- improve creation of the PowerShell chimera The full list of supported languages and technologies -- JavaScri...
by siberia-man
14 Sep 2020 08:46
Forum: DOS Batch Forum
Topic: SUDO for CMD
Replies: 9
Views: 12320

Re: SUDO for CMD

a way to redirect stdin/stdout/stderr from the elevated shell, back into the original shell
It looks like it is solved in gsudo. Sorry, it's C#, not a pure batch.
by siberia-man
08 Sep 2020 10:33
Forum: DOS Batch Forum
Topic: wsx.bat: REPL, one line program processor supporting some NodeJS features
Replies: 13
Views: 9027

Re: wsx.bat: REPL, one line program processor supporting some NodeJS features

Version is 1.0.1 (still Alpha). I updated the first post in the topic. Most of changes are cosmetic and some of them slightly improve description.
by siberia-man
05 Sep 2020 07:22
Forum: DOS Batch Forum
Topic: Batch array scripts, to make life easier
Replies: 6
Views: 2710

Re: Batch array scripts, to make life easier

A total absence of arrays in batches allows to implement them in different ways: -- arr[idx] (or something similar to) -- arr sep idx (like arr.idx or arr_idx etc) I think that the actual implementation of batch arrays lies on authors of the scripts they develop. In the other hand, if they need arra...
by siberia-man
31 Aug 2020 13:48
Forum: DOS Batch Forum
Topic: g.bat to jump between folders - need help to make it pure batch!
Replies: 16
Views: 7246

Re: g.bat to jump between folders - need help to make it pure batch!

I started review the code deeper and found some places for improvement. Later I found that better to rewrite it from the scratch. Perhaps i will try to do it (partially). From my perspective, there are few possible ways for evolution: 1. avoid \ with / replacement - in this case awk/find/findstr usa...
by siberia-man
30 Aug 2020 16:56
Forum: DOS Batch Forum
Topic: g.bat to jump between folders - need help to make it pure batch!
Replies: 16
Views: 7246

Re: g.bat to jump between folders - need help to make it pure batch!

As far as I understand correctly, the original g.bat script rotates over all folders matching a particular pattern. For example, if we have some folders: another/path/to/ mydir one/another/path/to/ my one/more/ my /dir the script invoked as below g.bat my will do CD to the first and second one (high...