Posts by Ricardo Bohner • 166 points
9 posts
-
0
votes1
answer26
viewsA: how to create a . bat that creates another . bat with more than one command?
Just use double ">>" plus sign to add the new commands at the end of the file instead of overwriting the commands that already exist in the new bat... echo msg * ola >> teste2.bat echo…
-
1
votes1
answer16
viewsA: How can I delete Regedit records that in the directory contain the serial "SID" by a file. bat
Try this: @echo off net session >nul 2>&1 || (powershell start -verb runas '"%~0"' &exit /b) for /f "tokens=2 Delims=," %%a in ('whoami /user /fo csv /nh') do ( echo…
-
0
votes2
answers185
viewsA: A bat that copies a file to a folder named after it
See if that’s what you want: Video Here is the code: @echo on :: Script de cópia do arquivo principal para a pasta no destino, com o mesmo nome do arquivo. set dir_orig=C:\teste\ set…
-
0
votes1
answer49
viewsA: help with bat scripts
Change that line: echo !Orgao!;!Matricula_Inst!;!Matricula!;!UPAG!;!UF!;!Nome!;!CPF!;!Rubrica!;!Sequencia!;!PMT!;!Prazo!;!CodUG!;!Status!;!Contrato!>>"%Pasta%_mod\%%~nxa" To: echo…
-
0
votes1
answer113
viewsA: Command findstr no cmd
I believe it’s something like this: @Echo off for /F "delims=" %%A in (ServerList.txt) do ( echo %%A:>>log.txt findstr "COEBuild" \\%%A\c$\NewPos61\PosData\POSVersion.xml>>log.txt )…
-
1
votes2
answers258
viewsA: How to validate if a login is valid inside . bat
Well for now it is so because I did not understand this part of 2 logins: @echo off :enterlogin cls echo. set teste= set digitos= set "letras=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"…
-
1
votes2
answers2019
viewsA: Automatic download by bat - View file date before download
I don’t have a file link . rar to test more I’ll give you an example using a zip file and Curl tool: curl -I https://www.macrorecorder.com/MacroRecorder_Portable.zip 2> Nul | find /i…
-
0
votes1
answer122
viewsA: Problem when trying to get CPU temperature using WMIC
I managed to do on Windows 8.1, but when I went to try the same batch on Windows 10 it didn’t work (I tried to run it on Windows 10 by remote connection because I don’t have access to a real Windows…
-
2
votes2
answers110
viewsA: Problems in batch droplet
Your error was that you did not set the %time variable. No percentage is used when setting the variable only when checking its contents. When IF happens it compares an existing variable "%temp% with…