Search found 208 matches
- 31 Aug 2018 03:01
- Forum: DOS Batch Forum
- Topic: foolproof counting of arguments
- Replies: 56
- Views: 102844
Re: foolproof counting of arguments
@dbenham I tested the last example. That's output I didn't expect to see C:\Temp>z "1 2" "3" The handle could not be duplicated during redirection of handle 4. ["1 2" "3] C:\Temp>z "1 2" 3 The handle could not be duplicated during redirection of handle 4. ["1 2] One more thing that seems not good. T...
- 01 Aug 2018 10:13
- Forum: DOS Batch Forum
- Topic: Cooler multi line comments.
- Replies: 8
- Views: 9165
Re: Cooler multi line comments.
One think I can present here is pie - the Plain, Impressive, Executable documentation format. It looks pretty flexible and easy in use but described not very clear and not very popular even in my plate
- 31 Jul 2018 22:36
- Forum: DOS Batch Forum
- Topic: Cooler multi line comments.
- Replies: 8
- Views: 9165
Re: Cooler multi line comments.
Multiple-line comments in batch scripts is certainly the interesting topic. Time ago I was inspired to implement them using internal facilities of the batch interpreter. I have thoroughly read this thread and other links to SO pages. To be honest, all the options with macros like %[:% and %:]% and o...
- 22 May 2018 14:28
- Forum: DOS Batch Forum
- Topic: Get arguments without temporary file
- Replies: 24
- Views: 17744
Re: Get arguments without temporary file
@jeb:
I think you are on the right way. But I can't understand why you parse the options before launching the test script? Why you don't use it simply calling like GetParam.bat %*?
I think you are on the right way. But I can't understand why you parse the options before launching the test script? Why you don't use it simply calling like GetParam.bat %*?
- 22 May 2018 12:41
- Forum: DOS Batch Forum
- Topic: Get arguments without temporary file
- Replies: 24
- Views: 17744
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...
- 05 May 2018 04:12
- Forum: DOS Batch Forum
- Topic: js/vbs/html/hta and more hybrids and chimeras in cmd/bat
- Replies: 64
- Views: 239444
Re: js/vbs/html/hta and more hybrids and chimeras in cmd/bat
I used another answer from that thread - https://stackoverflow.com/a/2611487/3627676jfl wrote: ↑01 May 2018 11:49I think the PowerShell support can be simplified, based on a post at https://stackoverflow.com/a/49063524
- 20 Apr 2018 19:34
- Forum: DOS Batch Forum
- Topic: Can I tell where a 7zip is to be unzipped to
- Replies: 1
- Views: 2581
Re: Can I tell where a 7zip is to be unzipped to
7za -h wrote:Code: Select all
-o{Directory}: set Output directory
- 20 Apr 2018 02:06
- Forum: DOS Batch Forum
- Topic: running multiple ssh commands in a batch file
- Replies: 7
- Views: 16986
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...
- 19 Apr 2018 22:29
- Forum: DOS Batch Forum
- Topic: running multiple ssh commands in a batch file
- Replies: 7
- Views: 16986
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...
- 10 Mar 2018 02:19
- Forum: DOS Batch Forum
- Topic: Rules for label names vs GOTO and CALL
- Replies: 53
- Views: 83521
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 ...
- 03 Mar 2018 13:38
- Forum: DOS Batch Forum
- Topic: detect batch launching method (prompt or icon double-click)
- Replies: 13
- Views: 11075
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.
- 03 Mar 2018 03:02
- Forum: DOS Batch Forum
- Topic: detect batch launching method (prompt or icon double-click)
- Replies: 13
- Views: 11075
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...
- 03 Sep 2017 03:17
- Forum: DOS Batch Forum
- Topic: Listc - a modern Windows file explorer/viewer in the console window
- Replies: 18
- Views: 21104
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...
- 19 Feb 2017 03:05
- Forum: DOS Batch Forum
- Topic: Using many "tokens=..." in FOR /F command in a simple way
- Replies: 59
- Views: 81526
Re: Using many "tokens=..." in FOR /F command in a simple way
I am not sure if you expect to see these.
- 14 Feb 2017 14:55
- Forum: DOS Batch Forum
- Topic: How to delete really loooooooooong file names?
- Replies: 4
- Views: 5561
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...