Category "batch-file"

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

Output AWS cli sync command from bat file to log file with timestamp

I would like to run aws s3 sync on a scheduled bat file, logging the output to a file with timestamps. Here is the bat file: cls set ARG1=%1 if %ARG1%==test co

Call multiple .bat from another .bat without waiting for one to finish

So, I want to make a script that will execute 2 .bat files and start some .exe files. However, the .bat files are supposed to keep running. I have something l

Call multiple .bat from another .bat without waiting for one to finish

So, I want to make a script that will execute 2 .bat files and start some .exe files. However, the .bat files are supposed to keep running. I have something l

Windows batch file command formatting with usebackq

I'm trying to assign the results of a git command to a variable in a Windows batch file. The line in question looks like: FOR /F "USEBACKQ tokens=*" %%i IN (`gi

No Module Named cx_Oracle

I created and execute a python script using PyCharm with Cx_Oracle module and it is working (able to select from an oracle table) but when I tried to use .bat f

batch file from scheduled task returns code 2147942401

I am trying to schedule a job to run a batch file with Windows 10 Task Scheduler, but it results in return code 2147942401. The batch file is on remote locatio

Get files with latest date from SFTP server using WinSCP in batch file

Hi I am totally new to WinSCP and Batch. I have figured out a script to transfer a folder from an SFTP site to my computer but would like to only grab the late

What does percent sign with tilde syntax(%~a) mean in command line [closed]

for %a in (*.txt) do ren "%~a" "%~na version 1%~xa" This command line script can rename files in a directory by adding text ( version 1) to th

How can I split text when there's an uppercase character? [closed]

I am making a batch file where I want to say "welcome <username>" but the username could be, for example, like "HiThere" and I want to p

How to create a .bat file which execute python file

I'm new to bat file and started to implementing it. I have a list of linux application commands which starts my application. I have a windows system to deploy,