Category "batch-file"

Behavior of bat and Powershell is different when clicked vs run from respective consoles, specifically with git

This post appears wordy, but there's actually not much here to read. Just figured more details > less details. I am working on some tools to speed up my git

check ProxyEnable in a batch file

I currently have two batch files: proxy_enable.bat reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" ^ /v ProxyEnable /t REG_DWORD

How to Detect Multiple Monitors in a Batch File

I have recently started diving into writing Batch files and I have a question. I'm trying to create a file that checks to see if my secondary monitor is connect

Get DNS resolution time with BATCH (cmd)

I'm trying to obtain the resolution time of my DNS server, but I'm not sure that I'm doing it well. First of all I tried to make a ping to my DNS server IP, a

How to get process ID of a specific process using wmic and check on error?

I created a batch script which runs WMIC to get the PID from a specific process. If I open the bat script I see 'ProcessID 1234' or 'No Instance(s) Available.'

Using batch to close open image file or word doc

I am coding a choose your own adventure game. Im at the point where a player would have a choice to look at a poster or a document on a desk and the game would

Using batch to close open image file or word doc

I am coding a choose your own adventure game. Im at the point where a player would have a choice to look at a poster or a document on a desk and the game would

How to randomly generate names for each file in folder in batch file?

I want to rename all files in folder to random name but it wants to rename all the files to the same name: ren "c:\Test\*.txt" %Random%.txt pause Output: C:\Us

Switch JDK version in Windows 10 cmd

Is there a way to change JDK version easily in cmd? like the version on mac. Change Default JDK on Mac.

How can I deal with this error in my Batch script?

I'm not sure what is happening as batch script closes almost immediately when I try to run it. It's pretty simple it should test whether a number(num) is a prim

XCOPY Folder with Variable Name and Spaces

I want to create a batch that deletes files from some folders and then copies them back into them from another destination (another server). Some of these folde

How to process pathnames with ! within an for /F loop?

In a complex batch file I want to read in files with paths, among other things, to read them into a variable one after the other separated by spaces. This works

Windows batch - concatenate multiple text files into one

I need to create a script, which concatenates multiple text files into one. I know it's simple to use type *.txt > merged.txt But the requirement is to "con

Opening a gif full screen in a Batch Script [closed]

I have a batch script and I need it to open a gif file and display full screen. I have done research and all I can find is how to open the gif

comparing filenames with .bat and writing missing entries into .txt

i want to compare some files in a folder and then write missing ones into a text file. i've got a folder c:\sessions\ with files in it. those files are

Batch - Move file that start with pattern to a certain folder

I have a list of files organized like this: test%MM%YYYY%DD.txt, for example: test01201401.txt test01201402.txt test01201403.txt ... test02201401.txt test02201

delay a batch file in under a second?

Is there any way to delay a batch file in under a second, for example 10 milliseconds? I have tried to write this: ping localhost -n 1 -w 10 But it didn't w

Using call <file.bat> results in "sleep is not recognized as an internal or external command.."

I have a script that calls other commands in a for loop: for %%x in (%CMDS::= %) do ( call C:\%%x %1% echo "%%x complete" ) However, running this results

Installing list of programs using batch files [closed]

I wish to make a batch file that installs multiple programs :INSTALLER 1. 7-Zip 2. Adobe Creative Cloud ... ... 44. WinRAR 45. WizTree 46. Zoo

Is it possible to check if a two files shares the same name using batch file?

I have here a example directory that contains files with the same name but different extensions. - MAINFOLDER ˪ TEST.JPG ˪ TEST.PNG ˪ RAN