50,336 questions
Advice
0
votes
2
replies
82
views
CSV file editing via bat file
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 ...
0
votes
3
answers
114
views
batch renaming of numeric files
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 ...
Best practices
1
vote
4
replies
121
views
Fastest way to count lines in a .csv from a .bat file?
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 ...
-1
votes
0
answers
47
views
Jenkins is unable to locate the executable file after extracting the Nexus NuGet package
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.&...
-2
votes
1
answer
68
views
DO Error during String Replacement using Windows Batch Script
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 ...
1
vote
4
answers
170
views
How to get from a url string the path to a file with a FOR loop in a Windows batch file?
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 ...
1
vote
3
answers
247
views
How to convert a batch to Powershell parallel processing to run over thousands of input files?
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 ...
-1
votes
2
answers
96
views
Passing variable with leading zero to BAT file causes error [closed]
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
=============...
1
vote
1
answer
103
views
Windows batch file cuts off file extension in for statement
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 ...
-3
votes
1
answer
97
views
how to change parent cmd windows directory in go
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 ...
0
votes
2
answers
177
views
How to accurately extract a block of text with CMD BATCH?
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 ...
2
votes
2
answers
81
views
Passing a string containg a £ sign to a command from a windows batch file
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 ...
2
votes
3
answers
226
views
Capture stderr separately in file while also including it in live output
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 ...
1
vote
2
answers
94
views
batch file to delete files from network share based on filename
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 ...
2
votes
1
answer
61
views
MediaInfo CLI; get item within a loop
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 ...