50,319 questions
Advice
0
votes
11
replies
143
views
How can I tell if a command is available in real DOS?
I want to create a batch program that allows me to execute a command, but only if the command is available in MS-DOS 6.22.
The command is accessible as long as it is located in any path included in ...
-2
votes
0
answers
71
views
Managing unit tests for batch script subroutines
Whenever I debug a non-trivial batch script I end up creating unit test scripts (batch scripts) for subroutines of the "arrange", "act" and "assert" type where the "...
Advice
0
votes
1
replies
94
views
How to make a batch file make a .txt file unless the file is already made where it will just edit it
Please can someone help me in my batch file that I am making. It is running on start-up already, however I would like it to make a .txt file or if the .txt file is already in that directory, edit it ...
Advice
1
vote
2
replies
111
views
How to bypass the 8-digit mark?
I have a directory with about 15,000 files (images, movies. sounds, etc.), "Dir1".
I also have a file with about 2,000 files that I need to find in "Dir1" and transfer to "...
Advice
0
votes
1
replies
82
views
Creating a batch script to automate zipped MP3 renaming?
I'm attempting to make a batch script/file to automate the following process:
Unzip .zip file with MP3 files in it
Rename Mp3s based on track listing (i.e. "XYZ (1)" becomes "01 XYZ (...
1
vote
1
answer
121
views
Extracting File Name from Path in Batch File
I am trying to make a batch program that cycles through files in a directory. My code is nested in a loop like so:
for /r "path/to/dir" %%f in (*.json) do (...)
%%f is a full path, but I ...
Advice
0
votes
2
replies
64
views
Learning Batch to automate basic steps in Windows 11
What would y'all say is the fasted way to learn and use batch?
I've started with a few basic scripts to automatically open a few programs on startup,
Additionally a generic matrix scrolling text thing ...
Best practices
0
votes
2
replies
122
views
For use by ServerFault scripters at shell - any OS "default top" names
What is the right list of characters for default, top at sorts of operating system as prefix?
AAAA
1111
Variation or different. As in DOS, a structure for files and operations at "most important ...
1
vote
1
answer
186
views
wmic os get localdatetime suddenly failing
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 ...
Advice
0
votes
1
replies
55
views
fc /b giving different results when using in a loop
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 ...
-1
votes
1
answer
124
views
Cron expression to call bat file with parameter failing
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 "...
1
vote
1
answer
123
views
How to include sub-folders in an [Array]
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?
@...
Advice
0
votes
9
replies
95
views
Batch to add new file type (without loosing existing one)
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;
- ...
Tooling
0
votes
4
replies
128
views
Automating repetitive tasks with Ruby and Selenium WebDriver
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 ...
0
votes
1
answer
66
views
Batch script using query session and logoff is not logging out users from remote servers
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 ...