Search found 1878 matches
- 20 Oct 2023 17:43
- Forum: DOS Batch Forum
- Topic: Is it worth learning Powershell?
- Replies: 10
- Views: 36306
Re: Is it worth learning Powershell?
First point: PowerShell is more powerful than Batch files. There are tasks that can not be completed in a Batch file, but in PowerShell. However, such tasks are rare. The vast majority of daily management tasks can be completed with a Batch file. That said, IMHO PowerShell is difficult to learn and ...
- 16 Oct 2023 12:59
- Forum: DOS Batch Forum
- Topic: Timeout with GUI adjustments breaks its design after first second passes
- Replies: 16
- Views: 63832
Re: Timeout with GUI adjustments breaks its design after first second passes
Are you sure you copied the Batch file as it is? Antonio Yes, I am sure... Mmmm... The script I posted have 47 lines. These are the last ones: 38::CreateSpacesFile numOfSpaces 39:setlocal EnableDelayedExpansion 40:set "spcs=" 41:for /L %%i in (1,1,%1) do set "spcs=!spcs! " 42:set /P ^"=X^ 43:% Do n...
- 14 Oct 2023 12:07
- Forum: DOS Batch Forum
- Topic: Timeout with GUI adjustments breaks its design after first second passes
- Replies: 16
- Views: 63832
Re: Timeout with GUI adjustments breaks its design after first second passes
It produces Info about what the script will do Info Executing in: Info 3The 2The 1The The script has been executed Info [Press any key to close this CMD window] and leaves that spacesFile.txt file behnd It works perfectly here: #1 Info about what the script will do Executing in: 3 #2 Info about wha...
- 13 Oct 2023 18:33
- Forum: DOS Batch Forum
- Topic: Timeout with GUI adjustments breaks its design after first second passes
- Replies: 16
- Views: 63832
Re: Timeout with GUI adjustments breaks its design after first second passes
What about this? @echo off cls echo/ echo Info about what the script will do echo/ setlocal EnableDelayedExpansion rem Get an ASCII CR (13) character for /F %%a in ('copy /Z "%~F0" NUL') do set "CR=%%a" rem Create a file with *just* 3 spaces call :CreateSpacesFile 3 set "countdown=3" echo Executing ...
- 13 Oct 2023 17:56
- Forum: DOS Batch Forum
- Topic: Variable inside an IF not showing correctly
- Replies: 18
- Views: 104420
Re: Variable inside an IF not showing correctly
One thing to add: robocopy "%IPADDRESS%\Dnload\VNC" "%wkdir%" "%FileName%" Echo %ERRORLEVEL% IF NOT ERRORLEVEL 1 GOTO FileCopied ERRORLEVEL that is compared in this case is the one from the ECHO command and it would probably always return success. You would have to use something like this: set errl...
- 26 Sep 2023 22:34
- Forum: DOS Batch Forum
- Topic: Advanced Batch features via auxiliary .exe programs
- Replies: 76
- Views: 211592
Re: Advanced Batch features via auxiliary .exe programs
Yes. The main reason for that is that my programs are written in assembly language. Not just the .zip file, but also several of my .exe programs are flagged by several antivirus programs with false positive alerts. :( However, none of the almost 6000 downloads in over 10 years have reported a single...
- 26 Sep 2023 21:23
- Forum: DOS Batch Forum
- Topic: Asynchronous catching of WM_PAINT window message, can it be done ?
- Replies: 2
- Views: 5732
Re: Asynchronous catching of WM_PAINT window message, can it be done ?
OK. Although this reply doesn't answer your question, I think you'll find it interesting because the topic is similar: drawing graphics on the screen and writing Batch hybrid scripts with both PowerShell and JScript languages. A method to Draw pixel resolution graphics in text mode using a 1x1 pixel...
- 20 Sep 2023 12:25
- Forum: DOS Batch Forum
- Topic: Microsoft Office settings copy to another profile on Windows 10
- Replies: 4
- Views: 3750
Re: Microsoft Office settings copy to another profile on Windows 10
First of all, I encourage you to carefully read this post (that is placed at beginning of this forum, so you surely have seen before).
Then, I invite you to read this funny post.
Finally, you should edit your question and add all the missing details...
Antonio
Then, I invite you to read this funny post.
Finally, you should edit your question and add all the missing details...
Antonio
- 29 Aug 2023 18:59
- Forum: DOS Batch Forum
- Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
- Replies: 550
- Views: 1991602
Re: How to replace only the second match in a text file?
You don't need a sophisticated replacement tool like JREP.bat to perform a replacement as simple as this one. This Batch file do that: @echo off setlocal EnableDelayedExpansion rem Get the line number of *the second* appearance of "[AddReg]" for /F "tokens=2 delims=:" %%a in ('findstr /N "[AddReg]" ...
- 29 Aug 2023 18:36
- Forum: DOS Batch Forum
- Topic: Como sacar los números?
- Replies: 9
- Views: 6920
Re: Como sacar los números?
Hello everyone, I was away for a while for health reasons. I am now looking for a CMD code to remove numbers from a text list that I have in a folder. The list have a bunch of txt files from 1 to 999, for example: 1-friends 20-recipes 99-family 300-addresses So, I need to take the number and the da...
- 29 Aug 2023 18:09
- Forum: DOS Batch Forum
- Topic: Safer way to parse curl output?
- Replies: 4
- Views: 22634
Re: Safer way to parse curl output?
This is the way I would do it: @echo off setlocal set "CurlResp={"device_code":"f00b07aab09048268c78787c7f878787","user_code":"HFYRBFJF","verification_uri":"https://idcs-zzzzzzzzzzd.identity.cloud ... es_in":300}" rem Remove braces set "CurlResp=%CurlResp:~1,-1%" rem Change ":" by = set "CurlResp=%C...
- 27 Aug 2023 19:22
- Forum: DOS Batch Forum
- Topic: Como sacar los números?
- Replies: 9
- Views: 6920
Re: Como sacar los números?
Lo primero que debes saber es que éste es un sitio en inglés. Debes traducir tus preguntas usando cualquier traductor (por ejemplo, pon en la barra de Google: "significado de english en español"). Las preguntas deben ser claras. Aunque tu pregunta es lo bastante sencilla para entenderla, deberías po...
- 24 Aug 2023 06:19
- Forum: DOS Batch Forum
- Topic: printf.exe: Arithmetic and Programming
- Replies: 22
- Views: 51992
Re: printf.exe: Arithmetic and Programming
Ops! I just realized that I forgot a couple of images in the printf.zip file 2.11 previously released. :( I added the missing files to the .zip, so please download the file again. Antonio PS - Could you please confirm if the printf.exe program is running correctly on your computer? :roll: Thank you ...
- 21 Aug 2023 20:06
- Forum: DOS Batch Forum
- Topic: printf.exe: Arithmetic and Programming
- Replies: 22
- Views: 51992
Re: printf.exe: Arithmetic and Programming
I have just released a new version of the printf.exe application. The new version 2.11 of printf.exe includes many new features. Firstly, this is a list of the original printf.exe features as implemented in the current version 2.11: All output is performed via the printf C standard function in the u...
- 21 Aug 2023 08:19
- Forum: DOS Batch Forum
- Topic: Copying a whole file to a variable array Call :SimpleFileToArray OutputArray Filename
- Replies: 6
- Views: 2280
Re: Copying a whole file to a variable array Call :SimpleFileToArray OutputArray Filename
Mmm... The first important point is that you have not posted a problematic input file, so we all could have a common data to test code... This is my code: @echo off setlocal EnableDelayedExpansion rem Count input lines for /F "tokens=3" %%a in ('find /C /V "" test.txt') do set "lines=%%a" rem Read t...