Search found 9 matches

by stephjo
23 May 2020 10:22
Forum: DOS Batch Forum
Topic: Just the total size of a folder & subfolders
Replies: 3
Views: 1281

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...
by stephjo
21 May 2020 15:44
Forum: DOS Batch Forum
Topic: Find and open a subfolder (using 'for' and 'start')
Replies: 1
Views: 791

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...
by stephjo
01 May 2020 15:39
Forum: DOS Batch Forum
Topic: Locate (x, y) cursor position for echo
Replies: 2
Views: 1602

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 ...
by stephjo
10 Nov 2019 16:51
Forum: DOS Batch Forum
Topic: Play a sound (.wav) file, without opening an application
Replies: 4
Views: 2227

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...
by stephjo
26 Oct 2019 12:44
Forum: DOS Batch Forum
Topic: Eliminating multiple empty lines
Replies: 4
Views: 7167

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. ...
by stephjo
03 Aug 2018 03:28
Forum: DOS Batch Forum
Topic: List files modified since set date
Replies: 2
Views: 1234

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...
by stephjo
20 Aug 2015 07:35
Forum: DOS Batch Forum
Topic: Listing file names (primary file name & file extension)
Replies: 1
Views: 1104

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...
by stephjo
03 Feb 2014 08:41
Forum: DOS Batch Forum
Topic: Reading tab and new line characters
Replies: 4
Views: 2070

Re: Reading tab and new line characters

Foxidrive: Thank you. The "tokens=*" to "delims=" displays tabs. How about empty lines (consecutive new line characters?)
by stephjo
03 Feb 2014 02:48
Forum: DOS Batch Forum
Topic: Reading tab and new line characters
Replies: 4
Views: 2070

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...