All Questions
Tagged with windows batch-file
1,306
questions
0
votes
2
answers
32
views
windows defender antivirus folder missing on local group policy editor
gpedit.msc was missing, i added it with using .bat
after restart i could enter to gpedit.msc but windows defender antivirus folder is missing
i need that folder to disable windows defender. pls help
...
1
vote
3
answers
140
views
Is there a difference between combining commands with & and running them one at a time?
Say I want to run multiple, computationally complex commands on Windows command line.
Does it makes a difference, performance wise, if I combine them with &:
doSomething1 & doSomething2 & ...
1
vote
2
answers
60
views
Sorting Windows Explorer's file checkboxes output
I'm writing a rough .cmd batch to do an operation with a few files (4 or 5) in Windows. I want to mark the desired files in Explorer's checkboxes, and drag-and-drop them to the batch file, that will ...
2
votes
1
answer
93
views
A batch file with an executable file checks if it is not in the processes in order to run another batch file (or code from it)
There are two batch files. Need to add a condition to the first file if the process is running nvcplui.exe then nothing, and if it is not running, then the second file (or the code from it) will be ...
0
votes
0
answers
53
views
Creating a bat file to force close microsoft excel
First of all, i am sorry if i post this in a wrong community as i am new to this.
So i am trying to run a bat file whenever something goes wrong, the code for the bat file is as follows:
taskkill /IM ...
1
vote
2
answers
127
views
Powershell in bat file closing console
I have a bat file that normalizes several audio files in one folder.
I create txt files with the same names as the audio files and I need to delete some lines from a txt file that will be used to ...
0
votes
1
answer
89
views
Why does an `echo` with brackets `()` break the `if` statement?
The if statement in following code shouldn't trigger, but it does. If I change echo () to echo [], it works as intended. So apparently it has something to do with the brackets ().
set a=1
set b=2
...
0
votes
1
answer
38
views
How to extract a part of a line that is between two specific strings using a batch script [closed]
I am trying to extract strings which are between <meta property="al:ios:url" content="snssdk1180://live?room_id= and " data-rh="true">.
Example Input:
<meta ...
3
votes
2
answers
507
views
Windows Batch Script: how to recursively go through all files except certain file types and folders?
I'm trying to do a replace string operation on all files except those in .git folder and all pycache directories which can appear nested in any nested directory. I'm executing the script in the root ...
0
votes
1
answer
87
views
Copy and rename batch file
1folder (cover.jpg)
2folder (cover.jpg)
3folder (cover.jpg)
.
.
There are so many jpg file with same name cover.jpg in multiple folders.
I am trying to copy and rename all cover.jpg in another folder ...
3
votes
2
answers
408
views
What Equivalent %* of Batch in PowerShell
Batch Script:
@echo off
if not "!!"=="" setlocal enabledelayedexpansion
for /f "tokens=4*" %%a in (
'dir /AD "%USERPROFILE%\" ^| find "DIR" ^| Find /...
0
votes
1
answer
32
views
If I created a task on a user called "A" and I want it to be executed on user "B", how do I do it?
I'm looking for help with "Task Scheduler" Windows 10
I don't know how to do it but basically, I have two users, "A" has admin rights and "B" does not.
I also saved the ....
0
votes
0
answers
36
views
Send input to running program Batch
I would like to start a cmd line program in Batch and be able to communicate with it.
Currently I am starting the program with start /b cmd /c "cli_program.exe" > log.txt. I am currently ...
0
votes
0
answers
29
views
Trying to find .exe over multi drive wide search in a bat file. Tried with relative path commands
As stated in the title I have a bat file set up to locate and run 2 separate exe's. One is located in the same folder as the bat file which for this %~dp0 works just fine. The second exe is one to a ...
0
votes
2
answers
93
views
How can I echo the actual logged in user if running batch as administrator?
I would like to know which user is logged in to Windows from the bat script I launch with right click and "Run as Administrator". If I try echo %username% the script obviously output "...