Search found 12 matches
- 18 Feb 2022 19:41
- Forum: DOS Batch Forum
- Topic: CMD.exe to Windows Terminal Porting: command line commands
- Replies: 3
- Views: 7374
CMD.exe to Windows Terminal Porting: command line commands
I recently switched to Windows 11 and I'm trying to use Windows Terminal (wt.exe) more instead of cmd.exe. In Windows 10 and Windows 7, I used to have many batch files that would launch cmd.exe and issue commands using the /c option. Like this: cmd.exe /c mkdir "c:\Users\mike\Desktop\newfold" & star...
- 03 Feb 2021 08:54
- Forum: DOS Batch Forum
- Topic: Playing a .wav file in the background
- Replies: 4
- Views: 9704
Playing a .wav file in the background
I have a high pitch "tada.wav" file that I'd like Windows to play in the background whenever I call it in my batch file. I want the file to play without opening any window or launching an application ... just like the default way Windows plays "you-got-mail.wav" or "chimes.wav" or other files in C:\...
- 12 Nov 2020 08:09
- Forum: DOS Batch Forum
- Topic: DEL *this* file (whatever its name) in Batch File
- Replies: 4
- Views: 5475
DEL *this* file (whatever its name) in Batch File
Hi DOS enthusiasts, I've got an image analysis software that spits out batch files and often changes the content and the name(!) and the location of the batch file for various reasons. So, very often, if I have a "DEL" command at the end of the file, the command doesn't execute because I don't have ...
- 23 May 2020 10:22
- Forum: DOS Batch Forum
- Topic: Just the total size of a folder & subfolders
- Replies: 3
- Views: 5653
Just the total size of a folder & subfolders
All I need is the sum total of all the folders and subfolders and files in a directory. More specifically, if I run the "dir /s" command, I get these two lines at the last. How can I get just the total number of bytes in a folder? 125 File(s) 682,763,152 bytes 7 Dir(s) 17,952,768,000 bytes free Is t...
- 21 May 2020 15:44
- Forum: DOS Batch Forum
- Topic: Find and open a subfolder (using 'for' and 'start')
- Replies: 1
- Views: 2812
Find and open a subfolder (using 'for' and 'start')
Hello, I'd like to find and open subfolder by name. I have the simple command line dir /a:d /s /b |find "amazon" |find /v "bak" That is, find (all) folders which have the word "amazon", but not with "bak" (e.g. I want "c:\mine\amazon" but not "c:\mine\amazon\bak" ) Then, I'd like to pipe this to sta...
- 01 May 2020 15:39
- Forum: DOS Batch Forum
- Topic: Locate (x, y) cursor position for echo
- Replies: 2
- Views: 4181
Locate (x, y) cursor position for echo
Hi DOS fans, I am wondering if there's a way to locate cursor to a particular (x, y) in a DOS Console window to print an echo statement. I am trying to print something that constantly changes and don't want the output to be running on the screen. Also, on a related topic, is it possible to print in ...
- 10 Nov 2019 16:51
- Forum: DOS Batch Forum
- Topic: Play a sound (.wav) file, without opening an application
- Replies: 4
- Views: 9403
Play a sound (.wav) file, without opening an application
Hello DOS folks, I was wondering if there's a way in DOS (or Windows 7 in general) to play a media file without invoking a software. Here's what I am looking for ... at the end of a batch file or a C++ program that takes many minutes to complete, I'd like to "beep" by playing the file "C:\Windows\Me...
- 26 Oct 2019 12:44
- Forum: DOS Batch Forum
- Topic: Eliminating multiple empty lines
- Replies: 4
- Views: 10327
Eliminating multiple empty lines
Hello DOS pepole, I have a 1000 text files and would like to replace three (or more) empty lines with two empty lines. How could I do this? That is, I'd like to replace three (or more) new line characters with two new line characters. I'm sure there's an easy way in DOS than writing a c++ software. ...
- 03 Aug 2018 03:28
- Forum: DOS Batch Forum
- Topic: List files modified since set date
- Replies: 2
- Views: 4496
List files modified since set date
Hello Fellow Batch File Enthusiasts, I am seeking help to write a batch file that lists only those .txt files modified on or since a given date, say 07/15/2018. Could you please help me? @echo off for /f "delims=" %%a in ('dir *.txt /o:d') do ( set fileLine=%%a set fileDate=!fileLine:~0,10! if !file...
- 20 Aug 2015 07:35
- Forum: DOS Batch Forum
- Topic: Listing file names (primary file name & file extension)
- Replies: 1
- Views: 2866
Listing file names (primary file name & file extension)
Hello, I would like to list files in a directory into a new text file. Each file name is 8.3 characters, with 8 characters for the primary file name, a dot, and file extension of 3 characters. For every file, I would like the primary file name in one line and file extension in the following line. Ho...
- 03 Feb 2014 08:41
- Forum: DOS Batch Forum
- Topic: Reading tab and new line characters
- Replies: 4
- Views: 5074
Re: Reading tab and new line characters
Foxidrive: Thank you. The "tokens=*" to "delims=" displays tabs. How about empty lines (consecutive new line characters?)
- 03 Feb 2014 02:48
- Forum: DOS Batch Forum
- Topic: Reading tab and new line characters
- Replies: 4
- Views: 5074
Reading tab and new line characters
Hi folks, I am working on a simple script that can read a file and display contents line-by-line. The following script (from another thread here) doesn't display the new line and tab characters in the read file. My hunch is that the solution is rather simple, but I can't seem to figure it out. Could...