Posts by It Wasn't Me • 1,897 points
127 posts
-
2
votes2
answers1720
viewsA: How to put . vbs inside . bat
Update (now that I think I’m done!) Bat + VBS in a single file Bat!?? What you seek is to have a Bat/VBS in a single file, i.e., a hybrid script of Bat & VBS? It is possible using tag of…
-
1
votes1
answer202
viewsA: Filter cmd output with VBS and return value
1) You could use his vbs but created by a bat 2) The same bat can call the execution of your vbs 3) On departure from the execution of vbs you filter strings by echoing 0 or 1 @echo off…
-
0
votes2
answers402
viewsA: For command not working with Findstr usage
- Code bat Suicida: Avoid this!! at bat: - for /f %%e in ('findstr "<cd_comiss>P</cd_comiss>" *.*')do del %%e at the prompt: - for /f %e in ('findstr…
-
0
votes2
answers105
viewsA: My while has no end
You have the alternative of implementing a case 5: with a continue. You have the option to use with or without the do while, works in both ways... case 5: printf("...Voce encerrou a…
-
0
votes3
answers1204
viewsA: Create bat to move files returned by findstr
Response considering questioning in the comment for destination folder filtering where there are occurrences of multiple strings or not, using the findstr.... It is possible to use findstr and act…
-
0
votes2
answers3791
viewsA: Write current Directory to a text file
You don’t even have to give the echo in the variable %cd% to get the current directory/folder, use the cd. Has command to do this direct, use the command cd (Check Directory), bat/cmd or command…
-
0
votes3
answers342
viewsA: How to escape characters in Windows Batch?
To use by passing argumento/parâmetro and not requiring previous edits in characters especiais present in the link. Basically, the bat will play the argument/parameter (%1) in the loop for and…
-
1
votes1
answer487
viewsA: Problems with additional files in Pyinstaller
To add the required files, as they are only 2, why not encode them to Base64 and add in the code/script itself, porting the files in itself? Doing so, for at runtime, vc will decode directly on the…
-
1
votes1
answer172
viewsA: Executable with Hidden console opening console
I suggest that edit/exchange the lines system for os.popen where: import os import time # system('taskkill /f /im explorer.exe') # -> ficaria: os.popen('C:\\Windows\\system32\\taskkill.exe /f /im…
-
2
votes1
answer95
viewsA: pdftocar: How to save the help text in text file from the prompt?
It is a specific case where the exit leads via stderr = 2> and didn’t see stdout = 1>, use 2> What worked here with in the case of pdftocairo.exe --help was: 2>pdftocairo.txt pdftocairo…
-
2
votes1
answer1161
viewsA: How to find a file without specifying folder/drive in bat or moon?
Update v2 Passing by parameter (lua.log) and insertion/input (lua.txt)... rem :: Abaixo descritivo das variáveis relativas aos arquivos: rem ::…
-
1
votes3
answers1929
viewsA: Operations with dates (delete file with date in name and earlier than 6 months) without using Forfiles
Option without being extensive, without using the command forfiles and compatible with the Windows XP®: Code commented below: @echo off & setlocal enabledelayedexpansion && cd /d…
-
0
votes3
answers1086
viewsA: Select "Open with" with . bat command
You can try using a bat that generates an HTA to open the image in full screen using vbs. This eliminates the need to have administrator/password/etc privileges... Note: 1) Works on Windows 7 asking…
batanswered It Wasn't Me 1,897 -
0
votes1
answer455
viewsA: Script to Copy Directory to Program Files folder with Administrator rights
Update: Based on the comment, disable UAC (User-Account-Control)... On the station/server/pc to run psexec.exe: Giving up a reg query in the key below return: EnableLUA REG_DWORD 0x1 reg query…
-
2
votes3
answers1819
viewsA: Create shortcut for complex commands in CMD
The variable Path has character length limitations... 1) Because it is a Bat that does not delete/remove any file or folder, you can add this Bat in the folder of Windows, thus taking advantage that…
cmdanswered It Wasn't Me 1,897 -
1
votes3
answers3006
viewsA: Search directory name of a file. bat
You can use variables and also their value/attribute/property expansions. In the code below you have some variables that are fixed and you have others that are changed according to the actions of…
-
3
votes2
answers501
viewsA: Open an executable file using VB or CMD
For use in the same folder and using relative paths for calling the executable (something.exe) passing the argument/file(Paçoca.legalcara) In VB Dim oFSO Set oFSO =…
-
3
votes1
answer114
viewsA: How to find out how many slots/memory banks are being used in VB
Welcome to OS/en You can get the information using the WMI in his vbs: strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colItems =…
-
1
votes1
answer59
viewsA: Library #include <Hsffi. h>
Welcome to OS/en Check the folder C:\Program Files\Haskell Platform\8.6.5\lib\include, in it you will find the file HsFFi.h and possible dependencies. Note: 1) Use a folder for your project, it is…
-
1
votes2
answers1450
viewsA: Generate error at the end of the copy in case some file is not copied
How about implementing a looping for the copy action? I suggest operating the copy of the files one by one isolating/deleting possible error message and logging if the file was not copied in your…
-
0
votes1
answer1265
viewsA: List specific directory in Windows - Filter in the list
To list all who are .jpg recursively and after the folder Y:\imagens\A002 you can try using the where within a loop for filtered by find avoiding the folder A002 to list, and picking up on findstr…
-
3
votes2
answers6606
viewsA: Automatic installation script without user interaction
Try installing with the command add-ons present in the reply, however, using the installer .exe , since you have available in the installer version .msi, and also the installer .exe for download on…
-
3
votes1
answer291
viewsA: Ffmpeg and BAT Automatic Conversion
Update Opera recursively in conversion You can use a for in a looping with the complement -y together with the operator &&, that will work like this: executa_sem_erro &&…
-
0
votes2
answers77
viewsA: How to hide another program window?
By citing prompt in question, understand that processes are being called via command, if applicable, could call for background execution: start "" /b nome_executavel.exe system("start "" /b…
canswered It Wasn't Me 1,897 -
1
votes2
answers107
viewsA: How to make a list comparator
If I understand the question, where do I understand you want to: 1) use a solution in bat/cmd as an option; 2) wants to separate items duplicates and unique of the contents of a file; To use, you…
-
10
votes3
answers685
viewsQ: Prevent the CMD command interpreter from using the operators passed via parameter/argument?
There is a way to prevent operators present in past arguments, via command line, from being used/interpreted by the interpreter CMD in C, C++ or C#? I want to make use of characters present in the…
-
4
votes2
answers476
viewsA: Translating copy command from CMD to Powershell Copy-Item
How your goal is to copy the contents of the files *abobrinha*.txt already concatenating in another file with name All the little things.txt, I believe the steps to achieving your goal are: Grabs…
-
2
votes1
answer220
viewsA: How to authenticate to a Firewall web page via Powershell/Selenium?
Why not use the vbs in the Powershell to send the necessary authentications? $wshell = New-Object -ComObject wscript.shell; $obj = New-Object -com Wscript.Shell; $wshell.AppActivate('Chrome');…
-
0
votes3
answers267
viewsA: Create a Bath file that performs the DIR of a folder or sets of folders that the user chooses
@echo off && setlocal enabledelayedexpansion type nul >"%userprofile%\desktop\conteudo2.txt" & set /p "_pasta=digite uma pasta: " 2<nul dir "!_pasta!" | find ".." >nul || goto…
-
0
votes1
answer88
viewsA: How to rename multiple . mp3 files by replacing the first argument of each one’s name with a sequential order of numbers
Welcome to the SO platform Supposing that the string in the names (ABC,CBA,BAC,BCA) sane: Exactly those and only those in this sequence 1) Implement a counter 2) list the mp3 files filters in the…
-
4
votes4
answers10576
viewsA: To create a folder named after the current date in Windows cmd.exe
Update Option to run a line: The command wmic OS Get localdatetime /value returns the string LocalDateTime=20190609123708.733000-180, using 2 delimiters, =., we get 20190609123708, then we use…
-
23
votes4
answers3721
viewsA: List files by name (containing date), but filter the 5 days prior to the current date with . bat?
Yes, you can get the dates and names of the files previous 05 days previous date via bat/cmd: Reads the date system and turn into numbers: 2019/01/01 = 20190101 That number subtraction the number of…
-
4
votes2
answers1253
viewsA: C program executing commands in cmd
To execute their commands 1 at a time, only add the command: cmd /c . Is this the interpreter of commando, and it is he who will "use/interpret ” your commands O layout do seu código ficaria dessa…
-
2
votes1
answer92
viewsA: How can I make a repeat structure here?(Fortran)
• If I understand the question, try remove do while within of if: Obs. 1 : What you want with variables read & if I didn’t understand, so I removed those variables and replaced them s & n…
-
4
votes1
answer2751
viewsA: BAT for telnet access passing user and password
---- The telnet command offers no options for insertion of dice of login: I’ll leave two here possible options to do it via bat/cmd with /VBS & bat/cmd with Telnet Script Tool: One option would…
batchanswered It Wasn't Me 1,897 -
1
votes2
answers597
viewsA: How to enter data at runtime?
I have some programs that we use developed in FORTRAN, and we don’t have the codes, and they only receive the input data via typing. Since there was no way to automate data receipt (we used many…
-
3
votes2
answers695
viewsA: How to give the option for the user to choose the destination folder in BATCH?
• Testado nas seguintes versões do Windows®: XP Pro 32 bits, 7 Pro 64 bits, 8.0 Pro 64 bits & 10 Pro 64 bits • There is an option to use resources from VBS to the folder choice via window / GUI,…
-
1
votes2
answers1575
viewsA: How to run file . vbs on Windows Start
Update Responding: The command that adds an entry in the record, instructing the execution of a commando / filing cabinet at each system startup via commando / bat: rem :: Obs.: O \" é para…
-
8
votes3
answers861
viewsA: Simulate "ok" via command line
• Testado nas seguintes versões do Windows® •: XP Pro 32 bits, 7 Pro 64 bits, 8.0 Pro 64 bits & 10 Pro 64 bits :: I believe you can make use of the sendKey (in VBS), to make some keystrokes…
-
0
votes3
answers13919
viewsA: List folders and subfolders cmd
Would that be commando that you seek to generate the listing with full path sorted by name? ordenar por nome adicione: /on (dir /s /b /o:g /ad /on) for /f "tokens=*delims= " %i in ('dir /s /b /o:g…
cmdanswered It Wasn't Me 1,897 -
0
votes1
answer251
viewsA: Restore Postgre . BAT
Not would be the case to apply a drop before? Update: getting date in layout faster. Check the information of that reply link @echo off & setlocal enabledelayedexpansion & cd /d "%~dp0"…
-
1
votes2
answers7988
viewsA: (cmd) How to unzip files from a . zip by Windows cmd
Update added support for passage argument [%~1] argument [%~2] Un_Zipper.cmd %~1 %~2 Un_Zipper.cmd Arquivo.Zip Dive+\Pasta-DestinoX para descompactar Arquivo.Zip Use with "parameter/argument" to…
-
1
votes2
answers1000
viewsA: How to get the pid of a windows process right after the process is run
Understand that we don’t have a command available / specific to get that information in the system Windows, the option was to make a bat to obtain that information ... Perform a process/programme…
-
0
votes5
answers22737
viewsA: How to turn the output of a command into a variable in CMD?
An option for save the command variable via looping for : @echo off && setlocal enabledelayedexpansion :: set "chv=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SPP\Clients" set…
cmdanswered It Wasn't Me 1,897 -
3
votes1
answer1017
viewsA: Create File Name with Day of the Week
-Update: + Speedy for date|day|week and compacted|shortened in the code : @echo off & setlocal enableextensions enabledelayedexpansion & set "_do=Get Day^,Month^,Year^,DayOfWeek" (set…
-
3
votes1
answer763
viewsA: Enable or maximize program window
In VBS it is possible using code: Update: for activate and also maximize the program window Set objShell = WScript.CreateObject("WScript.Shell") objShell.AppActivate "chromedriver" 'usando sendkey…
-
1
votes1
answer286
viewsA: Repeat loops with conditions seem not to work
Try using expanded variables with the command setlocal enabledelayedexpansion Also remove spaces before/after**=**when "set" the values for your variables Detail of date, output from WMIC Path…
-
1
votes3
answers115
viewsA: Invalid parameter in batch script
If I may suggest a "Experiment" .. Try to see if inside the if, the "()" is interfering? if exist arq (faz x) else (faz y)... what I understand comes to explain the message: "All:(from", where the )…
-
0
votes4
answers1004
viewsA: What are the batch commands/variables. Example [%username% or %groupname%]
Currently there are several commands that can return various information about the computer, the operating system, variables, etc. In bat, we can use the wmic, systeminfo, reg query among others, as…
-
3
votes2
answers158
viewsA: create a bat file
• If I understand the question, may I suggest that you use a bat to create a second bat and call that second one using the start /max already finishing the first bat... @echo off && >nul…
batanswered It Wasn't Me 1,897