New answers tagged

0

When using the start command the first set of quotes are the console window title. Either don't use quotes (your parameter has no spaces so quotes aren't required) or specify the window title. start "Title" chrome "https://google.co.uk/"


0

If you're using Windows 11, Microsoft has removed WMIC from the latest Insider builds. Instead, you should now use Powershell commands. To list all WMI Powershell commands, you can run Get-Command -Noun WMI*.


0

Refer to this bat file start open chrome chrome://downloads/ Not Possible ! But here is a little hack for this but in vbscript using SendKeys Set WshShell = CreateObject("WScript.Shell") WshShell.run "chrome.exe",1,False WScript.Sleep 7000 WshShell.SendKeys("chrome://settings") WshShell.SendKeys("{enter}") Or in ...


0

You have to use curl**.exe**, so : curl.exe -s -w "%{http_code}" https://www.sample.com/


0

In your first command, add audio filtering. FFPLAY.EXE -f lavfi "movie=Left.mkv,scale=640:-1,subtitles=Left.SRT:force_style='Fontsize=18,PrimaryColour=&H0000FFFF', setpts=PTS-STARTPTS[v0];movie=Right.mkv,scale=640:-1,subtitles=Right.SRT:force_style='Fontsize=18,PrimaryColour=&H0000FFFF', setpts=PTS-STARTPTS[v1];[v0][v1]hstack;[0:a][1:a]amix,...


0

You could use the UTF-8 Encoding to display Unicode characters. The following command will set the console to UTF-8: chcp 65001 If you wish to set UTF-8 to be the default for all future consoles, see the post Using UTF-8 Encoding (CHCP 65001) in Command Prompt / Windows Powershell (Windows 10).


0

Better late than never? If you don't mind using PowerShell (it doesn't appear in your tag list), you could do it with this: Get-ChildItem -Path 'C:\Users\*\Desktop\*' -File -Filter '*Edge*.lnk' -ErrorAction SilentlyContinue | Remove-Item That one-liner obtains all files matching the filter in every user's Desktop directory then sends them along the pipeline ...


1

This batch script creates a temporary VBScript in the %temp% folder. Would this be the expected result? @echo off if /i not exist "%~1" exit set SDestination=d:\ScenaryPhotos If /i not exist "%SDestination%" md "%SDestination%" pushd "%SDestination%" echo strTargetPath="%~nx1.lnk">"%temp%\tempvbs....


0

start command starts programs in unusual ways. It is not something that is used normally. In help for start (start /?) it discusses how to start programs normally and with start. taskkill /IM explorer.exe /F start explorer First line. Console programs always wait when started normally. To have them not wait you use start. Second line. GUI programs don't ...


2

Just i want to add another way using wmic to get fixed and removable drives letters : @echo off Title Get Fixed And Removable Drives Letters SETLOCAL EnableDelayedExpansion set /a count=0 @for /f "tokens=2" %%i in ('wmic logicaldisk where "drivetype=2" 2^>nul ^|find /i ":" ') do ( set /a count+=1 Set "...


2

Defining your variable without creating/using additional file... @echo off for /f tokens^=1*delims^=: %%i in (' fsutil fsinfo drives')do set "_drvs=%%~j" for /f tokens^=*^delims^=? %%i in (' call dir/b/a-d/s %_drvs:\=\Apollo.exe% 2^>nul ')do set "_fpath=%%~dpi" && set "_file=%%~fi" && goto %:^) %:^) echo\...


0

Thanks to scoberry5 from reddit: Here are the parts I think you want: XXXX some character, including newline, any number of times (as few as possible) one or more non-newlines (as many as possible) end of line, followed by a we-are-at-the-end-of-line marker You should be able to replace (XXXX).*?([^\n]+)\n$ with \1,\2\n , as in https://regex101.com/r/bldhDZ/...


2

This should do the job (modify as required): @echo off ( for %%a in ( c d e f g h) do ( if exist "%%a:\" dir "%%a:\Apollo.exe" /b /s /a-d ) )>"C:\Temp\list.txt" set /P Variable=<"C:\Temp\list.txt" If more speed is required, you should perhaps look for some third-party product for searching.


0

use "LAUNCH WEBSITE" instead of "LAUNCH PROGRAM" and write the path of the .bat file you want to run like C:\Users\A\Documents\my secrept\set-audio\set-audio.bat


1

With Notepad: Find what: XXXX\K\R(^[^'].+$\R){1,} Replace with: \r\n Search mode: Regular Expression Before After


1

Assuming that "things" and "stuff" are always the same, you could use this: Find what: XXXX\r\nthings\r\nstuff.*?\r\n(.*?)\r\n\r\n Replace with: XXXX, \1\r\n\r\n Where: \r\n\ : stands for the Windows end-line (carriage-return, line-feed) .*? : 0 or more character, non-greedy search () : defines a group \1 : the contents of the matched ...


0

lang-console @echo off setlocal disableDelayedExpansion for /f "usebackq tokens=*" %%i in (`dir /a:-d /b /s *.zip ^| findstr /v " [\\][^\\]*ms[^\\]*$"` ) do ( del /s /q "%%i" ) endlocal


0

I didn't see your previous question, but I understand you've made good progress with your attempts so far, congratulations. But consider its the title .." seems to ignore IF statement"... , brings the possibility of being confused with a question involving that same command, so (supposedly) your question has a high probability of being close (or ...


0

@ECHO OFF :: This batch file start program1, after closing it logs off pc TITLE my auto progam starter and loggoff on quit(sorry for the typing errors) ECHO Please wait... starting program1 ECHO ============================ START /WAIT steam://rungameid/40970 ECHO logging you off now... TASKKILL steam (or what the steam process is called, im not ...


0

@ECHO OFF START "" "steam://rungameid/40970" Timeout /T 25 /Nobreak :LOOP tasklist | find /i "STRONGHOLD" >nul 2>&1 IF ERRORLEVEL 1 ( GOTO CONTINUE ) ELSE ( ECHO STRONGHOLD is still running Timeout /T 5 /Nobreak GOTO LOOP ) :CONTINUE echo exited SHUTDOWN /l /f


0

So I eventually settled for this and abandoned the route of PowerShell. It's not pretty or elegant, but it worked. SET "patterncon=CON" SET "pattern=LPT1" SET "pattern2=LPT2" SET "pattern3=LPT3" SET "pattern4=LPT4" SET "pattern5=LPT5" SET "pattern6=LPT6" SET "pattern7=LPT7" SET &...


8

This is the right interpretation. for /r "C:\folder" %%a in (*.jpg) do magick mogrify -resize 580x320 "%%~a" I forgot double %%. Now it's working when I create and use .bat file.


1

AFAIK what you want to do is not possible with task scheduler alone. If you run as a User that is not Admin you can't run with Admin privileges and not get the UAC Prompt. What might be possible is to create a script that uses a secure-string in an encrypted file to get admin credentials and run the script as the user but with the privileges of the saved ...


0

in case anyone was looking for a full python implementation: import ffmpeg def abr_vbr_1st_pass(inputPath, params): params.update({ 'maxrate': params['b:v'], 'bufsize': params['b:v'] * 2, 'pass': 1, 'f': 'null' }) ffInput = ffmpeg.input(inputPath) ...


0

If you want to run the batch file as administrator: @echo off net session >nul 2>&1 || (powershell start -verb runas '"%~0"' &exit /b) cd "C:\Program Files\example_folder" :: next command :: next command


Top 50 recent answers are included