Search found 174 matches

by siberia-man
22 May 2018 12:41
Forum: DOS Batch Forum
Topic: Get arguments without temporary file
Replies: 24
Views: 10397

Re: Get arguments without temporary file

Time ago I was a bit angry on the algorithm parsing command line arguments in batch scripts. I made few attempts to implement something like getopts in Bash or GetOptions from the Perl's modules Getopts::Long or Getopts::Std. Today I decided to make some rough example to parse and count command line...
by siberia-man
05 May 2018 04:12
Forum: DOS Batch Forum
Topic: js/vbs/html/hta and more hybrids and chimeras in cmd/bat
Replies: 61
Views: 174772

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

jfl wrote:
01 May 2018 11:49
I think the PowerShell support can be simplified, based on a post at https://stackoverflow.com/a/49063524
I used another answer from that thread - https://stackoverflow.com/a/2611487/3627676
by siberia-man
20 Apr 2018 19:34
Forum: DOS Batch Forum
Topic: Can I tell where a 7zip is to be unzipped to
Replies: 1
Views: 1619

Re: Can I tell where a 7zip is to be unzipped to

7za -h wrote:

Code: Select all

  -o{Directory}: set Output directory
by siberia-man
20 Apr 2018 02:06
Forum: DOS Batch Forum
Topic: running multiple ssh commands in a batch file
Replies: 7
Views: 9902

Re: running multiple ssh commands in a batch file

difficult to understand how this code works This is tricky way to combine two scripts written in two different languages. We call it here "hybrid". Let me explain it step by step : << '____CMD____' @echo off ssh "%~f0" %* goto :eof ____CMD____ pwd ls The major trick is that this script will be proc...
by siberia-man
19 Apr 2018 22:29
Forum: DOS Batch Forum
Topic: running multiple ssh commands in a batch file
Replies: 7
Views: 9902

Re: running multiple ssh commands in a batch file

You can try hybrid script of batch+bash : << '____CMD____' @echo off ssh "%~f0" %* goto :eof ____CMD____ pwd ls or use the script cmdize.bat from https://www.dostips.com/forum/viewtopic.php?f=3&t=5543&p=37780#p37780 which will produce the same code as above. If neither of them work, you can try anot...
by siberia-man
10 Mar 2018 02:19
Forum: DOS Batch Forum
Topic: Rules for label names vs GOTO and CALL
Replies: 53
Views: 43707

Re: Rules for label names vs GOTO and CALL

Waw! Interesting thread. 4 years ago I have performed some investigations in this direction. I did it in the frame of the correct colorizing of labels in FAR3-embedded editor, soI don't pretend that my little work is 100% complete but it has some fruitful conclusions. The following link shows these ...
by siberia-man
03 Mar 2018 13:38
Forum: DOS Batch Forum
Topic: detect batch launching method (prompt or icon double-click)
Replies: 13
Views: 7566

Re: detect batch launching method (prompt or icon double-click)

Yes. I've seen it. But my intention was to share simple way even it is not 100% reliable.
by siberia-man
03 Mar 2018 03:02
Forum: DOS Batch Forum
Topic: detect batch launching method (prompt or icon double-click)
Replies: 13
Views: 7566

Re: detect batch launching method (prompt or icon double-click)

Hello guys, I know this is too old topic and there is no robust solutions. I remember that it has been discussed here but haven't found any methods mentioning the similar way. Anyway I'd like to share some finding with you. Googling one question that not having to do with the current topic I payed m...
by siberia-man
03 Sep 2017 03:17
Forum: DOS Batch Forum
Topic: Listc - a modern Windows file explorer/viewer in the console window
Replies: 18
Views: 14212

Re: Listc - a modern Windows file explorer/viewer in the console window

You seemed reinvented Norton Commander in the essentially lightened mode. As the toy or example of crazy programming, it could exist. Seriously! One this I could point. Put the following lines in the beginning of listc\l.bat script. It automates putting the location of the script and other auxiliary...
by siberia-man
19 Feb 2017 03:05
Forum: DOS Batch Forum
Topic: Using many "tokens=..." in FOR /F command in a simple way
Replies: 59
Views: 46228

Re: Using many "tokens=..." in FOR /F command in a simple way

I am not sure if you expect to see these.
by siberia-man
14 Feb 2017 14:55
Forum: DOS Batch Forum
Topic: How to delete really loooooooooong file names?
Replies: 4
Views: 3775

Re: How to delete really loooooooooong file names?

To answer to your question we need to know what are you meaning when you are saying "really long file name". 1. full path is too long. For example, c:\very\long\path-name\with\very-long-file-name could exceed the OS limitation (~8K chars per the object) 2. file name itself is too long. For...
by siberia-man
31 Oct 2016 09:04
Forum: DOS Batch Forum
Topic: PIE: new documentation format for batch scripts. Concept and implementation
Replies: 5
Views: 3853

Re: PIE: new documentation format for batch scripts. Concept and implementation

Definitely, I don't understand something. Each new Windows instance is like a separate operating system. Couple of hours ago the user of the Russian Grey forum has reported that on his PC the results of assoc/ftype commands differ if the arguments are quoted and not. Please check, if you have the la...
by siberia-man
31 Oct 2016 08:18
Forum: DOS Batch Forum
Topic: PIE: new documentation format for batch scripts. Concept and implementation
Replies: 5
Views: 3853

Re: PIE: new documentation format for batch scripts. Concept and implementation

Shame to me. If you don't understand, i haven't explained it well. cmdpie.bat is documented with PIE. You can run it and compare output with PIE. Let me time to reread what I have written before and I give more explanation. Regarding fsbox.bat. It is formatted with PIE but it is executable part crea...
by siberia-man
30 Oct 2016 13:30
Forum: DOS Batch Forum
Topic: PIE: new documentation format for batch scripts. Concept and implementation
Replies: 5
Views: 3853

PIE: new documentation format for batch scripts. Concept and implementation

Preamble This idea came when I desibed to develop a script creating some kind of sandbox for the application I am working on my job. It is java application working both win and unix. The main purpose was to settle the application into the filesystem looking like unix FS. The first version was writt...
by siberia-man
25 Oct 2016 23:01
Forum: DOS Batch Forum
Topic: Redirect STDOUT to GUI
Replies: 11
Views: 4551

Re: Redirect STDOUT to GUI

I have updated the script. It is now possible to configure the script globally with auxiliary file "2-settings.bat". Using it we can set some specific variables (%pipetmpdir%, %pipetmpname% and %pipetmpsave%).