Search found 211 matches
- 15 Aug 2018 14:00
- Forum: DOS Batch Forum
- Topic: %MM% v0.2a - a full-featured WinNT math macro
- Replies: 25
- Views: 61271
Re: %MM% - a full-featured WinNT math macro
The two main posters have me awed. My compliments! If I understand correctly, the name of the script that creates the macro variable %MM% is of little importance. I observed that it uses no input arguments and that to set up the macro, a minimum of two console interactions are needed after the macro...
- 06 Jul 2018 18:20
- Forum: DOS Batch Forum
- Topic: FindRepl.bat:New regex utility to search and replace strings
- Replies: 139
- Views: 297379
Re: FindRepl.bat:New regex utility to search and replace strings
Walk before running. Perhaps it would be easier to correlate the errorlevel with the results if you did not suppress them. Get rid of >NUL and you can see for yourself if there was output.Newbee wrote: ↑06 Jul 2018 17:05I do this:. . .Code: Select all
FindRepl "D:\\1" /S:=D:\1;D:\2; >NUL
The %errorlevel% are always 0, is it right?
John A.
- 04 Jul 2018 13:00
- Forum: DOS Batch Forum
- Topic: FindRepl.bat:New regex utility to search and replace strings
- Replies: 139
- Views: 297379
Re: FindRepl.bat:New regex utility to search and replace strings
I am having a problem with using the /R switch. I expected only one record to be displayed, but I get them all. Did I not interpret your instructions correctly? This input: Division Schedule Week of Play Schedule Date Start Time Note: Click the week of play link (i.e. Week 1, Week 2, etc...) to see ...
- 03 Jul 2018 18:49
- Forum: DOS Batch Forum
- Topic: Team schedules using a FindREPl hack
- Replies: 3
- Views: 6802
Re: Team schedules using a FindREPl hack
. . . I am glad to see that my work is useful. :D Thanks again and it was so useful that I applied the process to a different kind of input to feed a similar back-end. Instead of a PDF file, I visit a web page, perform a 'Select All' and copy to the Windows clipboard and use Steffen's paste VBS uti...
- 30 Jun 2018 17:05
- Forum: DOS Batch Forum
- Topic: spliting a single line into multiple lines
- Replies: 9
- Views: 16160
Re: spliting a single line into multiple lines (solved)
SOLVED. bars, thank you very much for sharing your progress and thought process. I examined all of your posts with great interest, because I was wrestling with the handling of spaces and tabs. It was all you with only one suggestion. Even though your requirement was solved, I am posting an added fi...
- 23 Apr 2018 10:29
- Forum: DOS Batch Forum
- Topic: Can anyone help on extending a command.
- Replies: 31
- Views: 27385
Re: Can anyone help on extending a command.
My apologies and this prob where confused. Looked in 7zip folder in c\program files and defentally not got 7ZA in there . What do I do to get it The old command I just copied off the net The old command that you copied, must be quite old. Mine contains a 7zG.exe. That program file folder contains a...
- 12 Apr 2018 01:17
- Forum: DOS Batch Forum
- Topic: Team schedules using a FindREPl hack
- Replies: 3
- Views: 6802
Re: Team schedules using a FindREPl hack
I set the following objectives: . . . 2. This script is a fully functional fork of FindREPL20.bat only intended to be used to call itself. 3. All user options are specified by dialogs with the user with no arguments required for printing schedules. A little more coding and these objectives are now,...
- 06 Apr 2018 00:38
- Forum: DOS Batch Forum
- Topic: Team schedules using a FindREPl hack
- Replies: 3
- Views: 6802
Team schedules using a FindREPl hack
Paraphrasing Bogart's character in Casablanca: "Of all the gin joints, I walks into …”. I have participated in two pool and one dart leagues during my membership at a local fraternal organization. Distribution of the team schedules has been established for decades, but require similar eyeball interp...
- 11 Jan 2018 13:48
- Forum: DOS Batch Forum
- Topic: copy with regular expression how to
- Replies: 8
- Views: 10404
Re: copy with regular expression how to
Here is a batch script that may do what I think you wanted. It only ECHOs the copy command. @echo off & setlocal Set "SysDATE=20180110" Set "SysTIME=08" For /F "usebackq tokens=* delims=" %%F in ( `dir /b NY_%SysDATE%_%SysTIME%* ^| findstr /i /r "[0-9$].xml"` ) do Set "File=%%~F" Echo.copy %File% e:...
- 07 Jan 2018 00:25
- Forum: DOS Batch Forum
- Topic: How to lift up this limitation...
- Replies: 4
- Views: 5898
Re: How to lift up this limitation...
This an oldie but goodie: Rem Posted: Sun Jan 22, 2012 9:02 pm by dbenham Rem Post subject: Re: foolproof counting of arguments Rem Start http://www.dostips.com/forum/viewtopic.php?p=13002#p13002 I chopped this from one of my scripts as an example: @Echo Off&SetLOCAL EnableDelayedExpansion &Rem.and ...
- 03 Jan 2018 01:10
- Forum: DOS Batch Forum
- Topic: Advanced Batch features via auxiliary .exe programs
- Replies: 76
- Views: 240388
Re: Advanced Batch features via auxiliary .exe programs
I ran into a limitation in the use of window.exe with no operands to get the TITLE of the current window. For some time, I have been handling some cases like this: :: . . . Rem Window.exe returns blanks when Title + 3 + Command exceeds 60 If NOT Defined Ttl Set "WinTtl=Undetermined - error, blank or...
- 23 Dec 2017 13:33
- Forum: DOS Batch Forum
- Topic: split string into substrings based on delimiter
- Replies: 44
- Views: 104400
Re: split string into substrings based on delimiter
I have modified my last post that contained code with comments to correct the negative return code and to point out a restriction in using overlapping search strings.
John A.
John A.
- 15 Dec 2017 22:50
- Forum: DOS Batch Forum
- Topic: Extract file name with largest suffix
- Replies: 3
- Views: 4890
Re: Extract file name with largest suffix
This seems to work on your test file:with the simplest assumptions about the real data.
John A
Code: Select all
@ECHO OFF&SETLOCAL
>sortfile.txt FINDSTR /c:"outbox/logs/Client_" file.txt
Sort /R sortfile.txt /O sortfile.txt
SET /P <sortfile.txt "MAXFILE="
ECHO file is : %MAXFILE%
pause
John A
- 25 Nov 2017 18:56
- Forum: DOS Batch Forum
- Topic: Working with the limitations of CmdFont
- Replies: 9
- Views: 11793
Re: Working with the limitations of CmdFont
Steffen, your results surprise me. I set to that size Consolas font and matched the Properties values. I reran after pasting from my own post. If you add a few SET commands for Gs, Wins and cF, the math will be revealed. Here is part of a more complex earlier attempt that I found too destructive to ...
- 25 Nov 2017 10:48
- Forum: DOS Batch Forum
- Topic: Working with the limitations of CmdFont
- Replies: 9
- Views: 11793
Re: Working with the limitations of CmdFont
Unfortunately the used API functions don't return the character width for fonts other than Terminal (raster font). That's the reason why I only output the height in that case. Wonderful. So we have Raster font support for 'CmdFont set' and pretty good results for 'CmdFont get' with quite usable out...