Category "batch-file"

Read a value out of a "complicated" JSON file [closed]

I'm using jq, but I didn't manage to get a value extracted from a .json-file (I got generated by mediainfo) in my batch-script. How can I get

How to run batch file inside Visual Studio 2022 Developer Command Prompt

I recently upgraded to VS2022 I cannot find a way to start developer command prompt and run a batch file inside it. Previously I called vsvars32.bat and it set

Batch file for removing certain information in a line

I have a gcode file .nc What I want to do with a batch file is remove all line numbering i.e. N1 *N2 N3 etc. I also want to remove the M00 at the start. Do you

Text file transfer between PC and Arduino using Batch scripts

I have a personal project based on file transfer between an Arduino Due and my PC. Theses files are in text format and can go over 10Mb. I firstly bought an SD

Trying to convert text into hex by calling a function within my batch file, but the hex code never gets returned to the Main batch function

@echo off goto :main :strg2hex setlocal EnableDelayedExpansion rem Store the string in chr.tmp file set /P "=%~1" < NUL > chr.tmp rem Create zero.tm

Combine PowerShell Defender outlets into a combined CSV file for monitoring

We cancelled our antivirus software (Kaspersky Anti-Virus, duh) and depend on the Windows Defender in the meantime. We won’t be getting any SIEM server to

How do you define the first day of the month (without including week-ends) in a batch script?

I have created a scheduled task in Windows that consists of running a batch script. The problem is that this task has to be scheduled every 1st day of the month

Running JAR from BAT file cannot find natives path

I am running my JAR from a BAT file on Windows 7 x64 machine. Lately I added native .dll files to project, so now I need to add the path to the BAT. My project

How to install application Updates on multiple windows machine using any tool or script [closed]

I have around 100 windows machine(VMs), All the machines have few updates for chrome , notepad/notepad++ , Firefox ,Jenkins which have not b

System cannot find path even though it exists in paths

Working on a batch file that calls another batch file. K:\Market Risk>call "K:\Market Risk\activate.bat" The system cannot find the path specified. So I s

File name pattern matching in Windows command line

I have several files like: a.txt a$.txt a$b.txt b.txt b$.txt b$c.txt I would like to print file whose name does not contain '$' using Windows command line fo

Execute Process Task in SSIS for Python Script

I'm trying to execute a python script by SSIS Execute Process Task. The Python script is correct. This script read data from yfinance and do some calculation,

Problems determining the 1st Sunday in a month

This following if segment is not working right. What I want to do is do something special if and only if it is the 1st Sunday of the month and something else e

CMD/BAT get date modified of all filenames and append to their filename

I am having trouble with this script. I'll explain below the codeblock. @Echo off pushd "\\server\folder" SETLOCAL EnableDelayedExpansion @FOR /F "TOKENS=2"

How to get .vbs output in the same window of a .bat file [duplicate]

I have a batch file that does a lot of different things and within that batch file, at some step, I'm running a VBS script. The problem is, th

The "startfile()" function is not working in Python 3.9.7 [duplicate]

I wanted to build a script playing an audio file in the background, so i found code on Stack Overflow to run an audio file without the window

Batch file %~dp0 don't work inside zip file

I had a batch file with a code: @echo off type "%~dp0\ascii.txt" PAUSE Basically, it opens the ascii.txt file and echo it in the batch file. It does work as it

How to get entire line that contains given string using findstr in batch script?

I need to get the line that contains the keyword ProductVersion from one of my svn repository csproj files. I have tried below code, but it is not working as ex

How to sort strings in a file numerically

In my batch script there will be a temporary file with the notes that are in a section (gotten from a json file but that doesn't matter) Format: (position of no

Check if file is locked inside a batch file for loop

I have a script that runs through some files and copies them to another location. But the script needs to wait until the file is no longer being written to. I t