Skip to main content

All Questions

Tagged with
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 & ...
overdriven's user avatar
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 ...
Agodless's user avatar
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 ...
Qwert Yuiop's user avatar
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 ...
Enema State's user avatar
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 /...
Mr.Key7's user avatar
  • 843
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 ...
octalgon's user avatar
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 ...
heyimvic's user avatar
1 vote
1 answer
61 views

Any way to do a Batch file move operation only when the HDD is idle-ish?

I know how to check if a specific program is running like winrar which might indicate usage on drive d: but is there a better way to determine if a drive is relatively idle enough (via Batch or other ...
Bricktop's user avatar
  • 313
0 votes
0 answers
389 views

Running a batch silently, but how can I get process ID to show a specific name?

I have followed this here to run a batch file silently, in the background and doesn't show on taskbar, it's great. How to run a batch file without launching a "command window"? The thing is, ...
Al So's user avatar
  • 1
0 votes
1 answer
170 views

"dir like" sorted by time in a batch file (.bat) using a piped string command: Get-ChildItem | Sort-Object -Property LastWriteTime, not working

I'm trying to build a trivial batch file in Windows for command line to execute a "dir like" command to list the directory contents sorted by time, avoiding typing: Get-ChildItem | Sort-...
nostromo's user avatar
0 votes
3 answers
276 views

Batch script to take first & second part of folder name and create new folders from them

Any wizards out there that can help with this? I have some music folders labelled like this "Taylor Swift - 1989" etc with just the music files and folder image in the one folder. I need ...
Shane Cusack's user avatar
0 votes
2 answers
250 views

Windows taskkill not finding titled cmd.exe

I'm starting a lot of .bats, in which I execute, for example: title Waterfall-Proxy I do this, to have an easier closing the right cmds when I want to shut them down. To shut them down, I'm using: ...
Deutsch - Musik's user avatar
0 votes
1 answer
2k views

How to verify if a variable is equal to an other variable or a Windows variable in batch files?

I am making a "locked" batch file that only certain user can use so what I am doing right now is to check the condition if what the user write is == to %username% or other variable like this:...
NTF espolion 307's user avatar
0 votes
2 answers
8k views

Using a .bat file how do I copy a file from its current directory to another directory?

I want to be able to have the batch file in any directory and have it copy the file to the specified directory. I have tried using: set path="%~dp0" copy "%path%\test.txt" "C:\...
arjeplog's user avatar
2 votes
1 answer
1k views

How to index into array with variable in batch?

I'm trying to process input arguments to a batch file, and I need to tie some paired arguments together before I call an executable at the end. I'm placing all the arguments into an array so I can ...
batchconfusesme's user avatar

15 30 50 per page
1
2 3 4 5
25