Skip to main content
Filter by
Sorted by
Tagged with
Advice
0 votes
2 replies
81 views

I have a report CSV file that has some special characters in the header row. I would like to set up a short script in a .bat file to remove these characters, so i can schedule a task to automatically ...
Donald.H.Hartley's user avatar
0 votes
3 answers
114 views

I would like to rename a bunch of files in a given directory that are already present in ascending order to another line of consecutive ascending numbers. The goal is to close gaps in between and get ...
Arek's user avatar
  • 1
Best practices
1 vote
4 replies
121 views

I have this .bat file that I use to open .csv files, which counts the lines in them and uses Excel to open if under a million records and a separate program to open if more than a million records. The ...
Tyler Moore's user avatar
-1 votes
0 answers
47 views

I attempted to execute the following command in a Jenkins batch script to run the executable named "GitFetcher.Exe," which is located within the tools directory of "IB.SO.AutoUtility.&...
Mahendran V M's user avatar
-2 votes
1 answer
67 views

I obtained a batch script from Google AI for performing string replacement on the content of a list of text files in Windows. This is what I got--with a little tweaking, first. (Just testing at this ...
Dave Clark's user avatar
1 vote
4 answers
170 views

Given is a string which is a url of a file, e.g. http://url.com/file.zip. I want to extract the path without the file name, i.e. http://url.com/. My idea for doing this was to break down the string ...
C4lculated's user avatar
1 vote
3 answers
245 views

I have a large number of files (about 3800) that I want to run a program over. The program reads a WAV file and makes a short .TSV text file containing the WAV's lip-sync data (but that is by-the-by ...
Benjamin Rich's user avatar
-1 votes
2 answers
96 views

My bat file named A.BAT is: @echo off set /a file = %1 set /a group = %2 @echo file is %file% @echo group is %group% ren %file% myfile-%group%_%date%.dat exit =============...
G Geber's user avatar
1 vote
1 answer
103 views

I noticed that some software I use, AutoDarkMode, doesn't randomize the first wallpaper it switches to, so I thought I'd write a batch file to do it by copying one wallpaper in the folder and renaming ...
JPrest's user avatar
  • 13
-3 votes
1 answer
97 views

I have a cli app written in go and when it closes I want the directory to move to the selected one. When I close I wasn't able to find any way for that to happen so I tried making a .bat wrapper for ...
Joseph Jitto's user avatar
0 votes
2 answers
177 views

I'm trying to output part of a file (the text enclosed between :begin(...) and :end(...) markers) using a BATCH script. The target is pure ASCII text but it may contain blank lines and symbols; the ...
Fravadona's user avatar
  • 17.6k
2 votes
2 answers
80 views

I am trying to create a trivial .bat file to act as shortcut to invoke a python script including a password that include a £ symbol. This fails because batch treats the £ as a box character I thought ...
MymsMan's user avatar
  • 325
2 votes
3 answers
226 views

Problem Given some arbitrary process that may or may not output to both stdout and stderr, I need a way to execute that process on the command line in Windows that captures stderr on its own. I also ...
OmniZ's user avatar
  • 143
1 vote
2 answers
94 views

I use an enigma2 receiver to record movies and TV shows. One recorded file has additional files: filename.ts filename.eit filename.ts.ap filename.ts.cuts filename.ts.meta filename.ts.sc I copy only ...
moses19850's user avatar
2 votes
1 answer
61 views

I need to get the mediainfo item "Bits-(Pixel*Frame)" from every mp4 file of a folder. If that item doesn't exists (It doesn't for all movies), I will try to derive it from other items. So ...
User42's user avatar
  • 105
2 votes
1 answer
117 views

I'm working on a VBScript to create a shortcut link to a batch file (the batch file downloads and launches a frontend Access database copy). The following code technically works but the shortcut link ...
sheridan1685's user avatar
1 vote
3 answers
93 views

I would like to write a simple Windows batch script that, given a directory containing a set of subdirectories, loops through them all and calls a batch script of the same name in each. The code I ...
keith969's user avatar
  • 383
0 votes
3 answers
164 views

I have a folder that contains 1000 .wav files on a Windows 7 system. I have fdkaac.exe in the system environment path. If I run the following batch file: for %%i in (*.wav) do fdkaac.exe -b256 -w20000 ...
Stan Duncan's user avatar
-1 votes
1 answer
131 views

A single (hybrid) file can contain both Batch and PowerShell script without generating extra temporary files by leveraging the comment syntax of each language. This allows the Batch interpreter to ...
samm's user avatar
  • 820
0 votes
0 answers
79 views

In Batch Script, when comparing a 2 digit number to a 1 digit number 08 & 09 are treated as low numbers but everything else works as expected. So if you run the following: IF 01 LEQ 1 ECHO 01 IF ...
Paul Birtle's user avatar
0 votes
1 answer
212 views

I wrote this batch to get the number of active processes given a certain command line value, but the not equal operator I use in the query to exclude WMIC.exe itself doesn't work, and the batch ...
PeterH's user avatar
  • 63
2 votes
3 answers
177 views

How can I put the entire Powershell output into a Batch variable? Another post has suggested @for /f "delims=" %%a in ('Powershell -C Get-Content myFile.txt -Raw') do Set "myVar=%%a&...
Nathalie Kitty's user avatar
-1 votes
3 answers
168 views

I'm attempting to do a simple find and replace using the Powershell Get-Content and Set-Content commands. In the Powershell terminal, I am calling the following expression: (Get-Content test_file.yml) ...
Trent's user avatar
  • 64
-1 votes
1 answer
84 views

In the below batch script, the script exits right after the datapatch command. The datapatch command executes successfully but none of the code in the if/else clause is executed. :: Define env ...
user13708337's user avatar
3 votes
1 answer
74 views

I looked through a few solutions here and found an almost working script to append to the user Environment Variable PATH without overwriting the existing path and not clutter it with system's EV's ...
user avatar
-1 votes
1 answer
69 views

I have a CSV file and need to change the date format in each record within a specific field. The file has headers and is comma delimited. I need to change this: Despatch_date [date],Order_Number,Name,...
Steve's user avatar
  • 1
2 votes
4 answers
204 views

The following Windows batch file sets the contents of the out.txt file to two ASCII characters, namely: X and <LF> (0x58 and 0x0A ). @echo off SETLOCAL SET LF=^ set /p=X^%LF%%LF%<nul>out....
George Robinson's user avatar
0 votes
1 answer
84 views

I have this simple batch file I'd like to process files in subdirectories. I've played around with the for /R but I can't seem to get it to work. Any help would be very appreciated. Thank you. Here is ...
user704270's user avatar
1 vote
0 answers
195 views

I'm trying to build MPC-BE, an open-source media player for Windows, using the instructions provided in Compilation.txt and the GitHub README, because I want to add some features to allow external ...
Kariyan's user avatar
  • 61
2 votes
1 answer
102 views

Below is code for a batch file, loosely based on something i found on the internet. Ultimately, I'm trying to call one of two different batch files. It doesn't seem to acknowledge Bob'sbatchfile.bat....
ham fam's user avatar
  • 95
-2 votes
1 answer
264 views

I have a scheduled task, which runs a batch file every 3 minutes. This batch file checks the running task list, looking for a certain running task. If the task is running, the batch file exits. If the ...
edd's user avatar
  • 11
2 votes
1 answer
89 views

I just want to leave a reminder about the %~ symbol combination, but my running my batch file outputs this: C:\Users\batch\batch>add_one2The following usage of the path operator in batch-parameter ...
Hocuda's user avatar
  • 23
2 votes
1 answer
108 views

When I run a script, for example one that says echo a>>1.txt the command line interpreter adds a space; so in the command line, executing the above says echo a 1>> 1.txt And of course, ...
Alex's user avatar
  • 1,143
1 vote
1 answer
157 views

I want to close a specific Excel window without closing the others, using a common .bat, how could I do it? I tried using this command: @echo off powershell -NoProfile -Command ^ "Get-Process ...
Alex Sander's user avatar
1 vote
2 answers
74 views

I have been at this for a few days and can't figure out why this is not working. I had made this to run with lf file manager but I'm testing it from command prompt with file.bat test.mkv or file.bat ...
Canute S's user avatar
  • 416
4 votes
1 answer
189 views

I put Daily Test Run.bat inside E:\Test folder. This is the content of the bat file: @echo off cd /d "%~dp0" echo %~dp0 cd /d E:\Dev cd /d "%~dp0" echo %~dp0 Then I cd to E:\...
Graviton's user avatar
  • 83.2k
2 votes
1 answer
119 views

see this example please: C:\ ..ex1\ ....start.bat ....111\ ......1.bat ......222\ start.bat: @echo off pushd 111 call 1.bat popd echo CD is wrong:%cd% pause 1.bat @echo off setlocal pushd 222 ...
Badr Elmers's user avatar
  • 1,816
5 votes
1 answer
215 views

A while ago there was a security advisory published for Rust that the standard library's Command API was not sufficiently handling arguments passed to cmd.exe and .bat files such that malicious ...
kmdreko's user avatar
  • 65.4k
0 votes
1 answer
53 views

I have a function that calls a program, it is trying to run a pkzipc with a path parameter that has double quotes and spaces. I have tried to escape spaces and quotes in different ways as mentioned in ...
Sri Reddy's user avatar
  • 7,054
0 votes
0 answers
91 views

I have a file on my Desktop named 3390.rdp, complete with all login credentials. I'm trying to use it to connect to a Ubuntu installation on WSL2. When I open the Ubuntu "app" manually, and ...
Robert Goddard-Wright's user avatar
0 votes
1 answer
95 views

I am trying to write the batch script but not sure how to check the below condition. I want to read all 3-digit number's folders and the 'data' folder only as first level directory, and inside these ...
RAJHLD's user avatar
  • 11
0 votes
1 answer
71 views

In a Windows OS and using batch file commands, how can I program a script to copy a file into a directory location that changes with unpredictable version numbers? Say today I have this C:\Program ...
Dale's user avatar
  • 5,997
0 votes
1 answer
75 views

How do i run batch from the web locally? I'm trying to kill a process locally (sas.exemy own file) but from web.
Floppa's user avatar
  • 25
0 votes
0 answers
62 views

This is puzzling to me. I launch the a process via command line or a batch file in windows: >start "MY_TITLE" one_process.exe %some_arguments% So ideally the application (window) title ...
xymzh's user avatar
  • 227
1 vote
3 answers
140 views

Trying to figure out the syntax in a batch file subroutine so it could be reused with a passed parameter. Main portion of batch file... Set PC=THISISATEST Call :ToLowerCase Subroutine... :ToLowerCase ...
user3208239's user avatar
0 votes
1 answer
261 views

I try to setup a virtual environment for a Python project, and the command source doesn't work: C:\Users>source MyEnv 'source' is not recognized as an internal or external command, operable program ...
Darkhydro's user avatar
  • 2,107
0 votes
1 answer
140 views

in this code I think I have to write set /a counter=%counter%+1 but I just tried write it without %% and interestingly it works I don't how?! can anyone explain it @echo off setlocal ...
Mikel91's user avatar
  • 33
2 votes
2 answers
84 views

-> I want to find this string in the text file flashwareFileName="FL_992920900X_0143__V001_S.pdx" Attempts: findstr /s "=\"FL_" *.xml > temp.txt findstr /s "=FL_&...
Steve1506's user avatar
0 votes
1 answer
62 views

I'm trying to figure out how to get this nested loop to work without delayedexpansion. My original block shown below works as intended, but after writing it, I discovered I can't save the changes to ...
AuthG1k2's user avatar
0 votes
2 answers
53 views

Basically the same as compare a character with double quotes " in windows batch But when I use that answer I get an error: ( was unexpected at this time set foo="foo" if %foo:~0,1%==^&...
a101010's user avatar
  • 101

1
2 3 4 5
1007