Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!
Score of -4
0 answers
39 views

I started learning batch programming last week. Below are the 3 files I was testing with: main.cmd: fc /b aa.txt bb.txt aa.txt: This is the aa text file bb.txt: This is the bb text file I ran main....
Score of 1
2 answers
88 views

In Windows 11 pro, I'm writing a cmd.exe batch script subroutine to clear variables who's names start with names passed to the subroutine as follows: Here is how the subroutine is called and its ...
Score of -6
0 answers
70 views

I'm running Windows 11 and when I run the following batch file, after I press the enter key, it displays in the command line console: 100 was unexpected at this time. \>if /A 100 LSS 10 echo "...
Score of -1
2 answers
108 views

I have a .bat script called with a few parameters, the last one -plusthis (optional, but must be the last one) is followed by key-value pairs enclosed within double-quotes, with an equal sign between ...
Score of 0
0 answers
91 views

I am writing a script that is meant to be ran at the end of an application being installed. The script needs to check if certain folders in C:\ProgramData already exist, create new ones if they don't ...
Advice
0 votes
5 replies
82 views

I'm trying to find a batch file that can run 7zips unzip command on all the .zip archives in a folder and all of its subfolders while keeping the structure of said folders and subfolders. for example ...
Advice
0 votes
11 replies
149 views

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 ...
Advice
0 votes
1 replies
94 views

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
115 views

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
86 views

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 (...
Score of 1
1 answer
133 views

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
69 views

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
127 views

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 ...
Score of 1
1 answer
220 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 ...
Advice
0 votes
1 replies
60 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 ...

15 30 50 per page
1
2 3 4 5
3355