Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
0 answers
53 views

Intro I have the a BAT file I am executing through cronical ( a windows cron like service). Everything was working fine for 10 days..and then today suddenly the timestamp calculation is failing, and ...
Μenelaοs's user avatar
  • 25.2k
Advice
0 votes
1 replies
38 views

I have a batch script compare.bat where I compare a 2 files using fc. In my Example AA is different and BB and CC are identical. When I use fc as in the top example Ex1 it preoduces " Files are ...
user3443063's user avatar
  • 1,727
-1 votes
1 answer
107 views

I have the following BAT file that takes two params; HOST, and REPORT_NAME. I want to call it from Cronical. @echo off setlocal enabledelayedexpansion REM ===== 1. Read parameters ===== set "...
Μenelaοs's user avatar
  • 25.2k
1 vote
1 answer
96 views

I have the following script which works perfectly except for the fact that it only copies the .txt files in the main [top] folders and NOT the sub-folders as well. How can I include the sub-folders? @...
Paul Black's user avatar
-2 votes
0 answers
93 views

I'm trying to create an installer that runs several batch files - one after another (synchronically) and display their output in a custom page. This is my code (took example from this solution): [Code]...
David Cohen1's user avatar
Advice
0 votes
9 replies
86 views

I used a batch gnu for windows tool to split "file1.csv" files in multiple files. As result it creates a list of files placed in a secondary folder like: - file1.csv_aa; - file1.csv_ab; - ...
Toni Meneses's user avatar
-2 votes
0 answers
57 views

I want to type multiple words, that will be stored in string separated by 'enter'. Something like this: input = "word1 word2 word3 word4 (...)" Here is my code cd /d "%~dp0" @echo ...
Shruikan's user avatar
Tooling
0 votes
4 replies
109 views

I followed the advice from this question and I started to experimenting with Selenium, but I feel like it has to many limitations. Could you recommend something more suitable? A simple program that ...
Shruikan's user avatar
0 votes
1 answer
55 views

I am trying to automate an application update across multiple Windows servers. Before the update runs, I need to log off all users (Active, Disconnected, Hung, etc.) from several servers, except the ...
Geo Thomas's user avatar
Best practices
0 votes
4 replies
71 views

I'm making a jokey-joke batch script that needs a password input to get in. I'm trying to make a part of it where it re-writes a .txt file and generates random stuff and hides the password in there. I ...
Recurser's user avatar
Advice
0 votes
6 replies
85 views

I have multiple directories and in each of those subdirectories, there's a subdirectory called !img which contains backup images of the previous directory. Like this: Test1\!img \Other\!img \...
user704270's user avatar
-4 votes
2 answers
125 views

I am using a for loop to recursively search through a directory for files of a specific file type, and then extract them to a different location. Right now I extract all of the files to the same ...
David K's user avatar
  • 1,350
1 vote
1 answer
116 views

I try to make a batch file to just confirm hosts are up. I have sections that work just fine but when trying to put them together it all goes to hell. The code is as follows: @echo off setlocal ...
Tired's user avatar
  • 3
1 vote
3 answers
91 views

The code below shows the BIOS mode UEFI or Legacy if used in cmd (command prompt window) or in a batch file. How to modify the below command line so that a variable can be used, for example BIOS_MODE, ...
markus625's user avatar
3 votes
1 answer
113 views

I am trying to implement a minimal "tee" function in batch. I followed an example as the base for my code, which uses tee_nt.txt as its source. I've written a simple test to understand the ...
Furutsun's user avatar
Advice
1 vote
6 replies
83 views

I'm trying to write a Batch file that will recurse 1 level and for all the directories in that level, go in to each of them and run commands. For example. In every directory in my current directory, I ...
user704270's user avatar
Advice
1 vote
2 replies
94 views

I need to build a cmd file that copies "Merge.txt" from the same directory of cmd file to "D:\StackFlow\" Note: I want to copy that file whenever I change the directory source
A Mu's user avatar
  • 23
Advice
0 votes
5 replies
100 views

I have some data fields gathered in a SET statement like this: set "datastr=%num_cde%, %id_achat%, %modele%, %sysfam%, %serial%, %ldt%" later assigned to an email body as: SET "...
calade's user avatar
  • 35
1 vote
1 answer
136 views

I have a batch escaping problem involving 3 files: chain.bat conatins this code: for %%x in (%*) do ( %%~x ) b.bat contains this code: chcp 65001 >nul start chrome --profile-directory="...
Shai Ben-Dor's user avatar
-1 votes
1 answer
83 views

SET UP I have multiple scripts that I execute with a .bat file, like so: cd C:\\path\\to\\my\\project\\directory echo Running script 1 "C:\\ProgramData\\miniforge3\\envs\\myenv\\python.exe" ...
bismo's user avatar
  • 1,655
11 votes
2 answers
812 views

I'm trying to persist the last modification timestamp of a set of files in a Git repository. I understand that Git doesn't natively support tracking filesystem metadata, so some sort of customization ...
IInspectable's user avatar
  • 53.4k
Advice
0 votes
3 replies
115 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
144 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
142 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
-2 votes
1 answer
98 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
5 answers
211 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
261 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
114 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
110 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
106 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
193 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.8k
2 votes
2 answers
83 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
256 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
99 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
74 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
129 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
100 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
  • 429
0 votes
3 answers
201 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
141 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
88 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
221 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
201 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
239 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
  • 66
-1 votes
1 answer
94 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
4 votes
1 answer
177 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
77 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
270 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
90 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
211 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
114 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
  • 93

1
2 3 4 5
1007