Search found 208 matches

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: 167
Views: 210064

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: 64
Views: 314518

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: 10531

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: 10531

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...
by siberia-man
05 Jul 2016 07:22
Forum: DOS Batch Forum
Topic: If...Else If - how to make this work
Replies: 5
Views: 7542

Re: If...Else If - how to make this work

Jer You can try this one: Conditionals on steroids It allows to implement something like this one If cond1 And cond2 Then Else If cond3 Or cond4 Then Else End If in the form as here call :if cond1 && call :if cond2 && ( rem do something1 ) || call :if cond3 || call :if cond4 &&a...
by siberia-man
17 May 2016 04:50
Forum: DOS Batch Forum
Topic: We can use bash in our scripts now in Win10
Replies: 20
Views: 45110

Re: We can use bash in our scripts now in Win10

The hybrid by penpen can be improved to avoid some possible troubles if the text within multiline text for some reasons will contain the command substitutions: : > /dev/null # ^ echo ' > nul @echo off echo:==== cmd bash "%~f0" %* echo:==== cmd again goto :eof ' > /dev/null echo "==== ...
by siberia-man
19 Apr 2016 07:11
Forum: DOS Batch Forum
Topic: We can use bash in our scripts now in Win10
Replies: 20
Views: 45110

Re: We can use bash in our scripts now in Win10

Another hybrid as a combination of two solutions above. It is a bit simpler than mine or by penpen but has more limitations. : <<____CMD____ @echo off echo:cmd bash "%~f0" %* echo:cmd again goto :EOF ____CMD____ echo "bash" for n in "$@" ; do echo "$n" ; done ...
by siberia-man
19 Apr 2016 02:37
Forum: DOS Batch Forum
Topic: We can use bash in our scripts now in Win10
Replies: 20
Views: 45110

Re: We can use bash in our scripts now in Win10

bash-in-batch hybrid can be like vbs-in-batch one as it is shown here http://www.dostips.com/forum/viewtopic.php?f=3&t=5543&start=30#p37780 : # @echo off : # echo:==== cmd : # bash "%~f0" %* : # echo:==== cmd again : # goto :EOF echo "==== bash" for n in "$@&quo...
by siberia-man
28 Mar 2016 00:10
Forum: DOS Batch Forum
Topic: enhancement to cmd.exe
Replies: 1
Views: 3765

Re: enhancement to cmd.exe

Mod edit: Just a note to say that this modifies your registry to auto-load this script in the future. You will need to uninstall it to disable this feature. That is true if someone would like to install it explicitly: setcmd.bat autorun -i or uninstall it setcmd.bat autorun -u In other cases the sc...
by siberia-man
25 Mar 2016 04:00
Forum: DOS Batch Forum
Topic: enhancement to cmd.exe
Replies: 1
Views: 3765

enhancement to cmd.exe

In real life I prefer using more powerful and flexible tools like Clink, ConEmu and Far. But it was so fun to develop this script. Once executing the script setcmd.bat you will get more benefits working under cmd.exe. Mod edit #2: Just a note to say that this has an install feature to modify your re...
by siberia-man
08 Mar 2016 23:31
Forum: DOS Batch Forum
Topic: readlink emulation: first approach
Replies: 7
Views: 8505

Re: readlink emulation: first approach

jeb , this is bad news. They seem to try localize everything possible. VERBINDUNG is the German translation for JUNCTION. I am using non-localized version of Windows where all symbolic links are marked as SYMLINK, SYMLINKD and JUNCTION. I need to check how these markers are presented in Russian. Mo...
by siberia-man
08 Mar 2016 03:35
Forum: DOS Batch Forum
Topic: readlink emulation: first approach
Replies: 7
Views: 8505

Re: readlink emulation: first approach

sambul35 , good point. Of course, symbolic links are needed mostly for compatibility purposes. For example, if some application has to do with the specific directory structure and we need to keep it working in the new environment. I guess "C:\Documents and Settings" pointing to "C:\U...
by siberia-man
07 Mar 2016 03:59
Forum: DOS Batch Forum
Topic: readlink emulation: first approach
Replies: 7
Views: 8505

readlink emulation: first approach

Unix has the command readlink for printing values of symbolic links. Windows doesn't have. This post is the first attempt to close this lack. @echo off for /f "tokens=*" %%f in ( ' dir /b /al "%~1*" ' ) do for /f "tokens=1,2,3 delims=[]" %%a in ( ' dir /al "%~dp1%%...
by siberia-man
11 Feb 2016 05:28
Forum: DOS Batch Forum
Topic: Color in batch programs
Replies: 9
Views: 10841

Re: Color in batch programs

What about this one? ANSI escape-oriented PowerShell script: https://github.com/ildar-shaimordanov/cmd.scripts/blob/master/ansi.bat Reading from command line arguments ansi "\e[47m \e[0m\n\e[44m \e[0m\n\e[41m \e[0m" Reading from pipeline echo \e[47m \e[0m\n\e[44m \e[0m\n\e[41m \e[0m | ansi Reading f...
by siberia-man
21 Dec 2015 05:54
Forum: DOS Batch Forum
Topic: Problems with Batch-VBS Hybrid
Replies: 4
Views: 7281

Re: Problems with Batch-VBS Hybrid

@Meerkat:
Have you tried this script viewtopic.php?f=3&t=5543&p=37780#p37780 ?