Search found 6 matches

by Gustaaf
26 Jul 2024 13:34
Forum: DOS Batch Forum
Topic: updated function :substitute
Replies: 0
Views: 20861

updated function :substitute

The substitute function seemed a bit slow too me. Also added optional OutFile parameter. I have updated it, or it can get its own name :searchandreplace. :substitute OldStr NewStr File [OutFile] -- substitutes a string in a text file :: -- OldStr [in] - string to be replaced :: -- NewStr [in] - stri...
by Gustaaf
15 Jul 2024 12:22
Forum: DOS Batch Forum
Topic: Smart Logging with date time stamps and more.
Replies: 0
Views: 15526

Smart Logging with date time stamps and more.

I have created these variables to hold actions to facilitate batch logging features. It relies on NTFS data streams. So FAT32 volumes will fail. The idea is to prevent duplicate lines of code for those who need to log what they are doing. See the examples in the code. @echo off prompt $ SETLOCAL ENA...
by Gustaaf
15 Jul 2024 11:10
Forum: DOS Batch Forum
Topic: ReadINI function
Replies: 0
Views: 15508

ReadINI function

This is seperate post to my WriteIni function. The ReadIni function is in part inspired by another thread. :: Function to read an entry from an INI file :READINI REM ====================================================================== REM Function: READINI REM Author: G.A. von Pickartz, built with...
by Gustaaf
15 Jul 2024 11:07
Forum: DOS Batch Forum
Topic: WriteINI function.
Replies: 0
Views: 16438

WriteINI function.

I have created a dos function called :WriteIni. I thought i would share for comment and improvement. Perhaps it can make its way to the dostips functions list? :: Function to write or update an entry in an INI file :WRITEINI REM ====================================================================== ...
by Gustaaf
07 May 2019 08:13
Forum: DOS Batch Forum
Topic: Ipconfig doesn't work inside a bat file
Replies: 18
Views: 23034

Re: Ipconfig doesn't work inside a bat file

I recommend to move C:\Windows;C:\Windows\System32; etc (anything to do with Windows) to the front of the path. Always keep OS path statements upfront. Lots of installers simply append to the front of the path statement, pushing your much needed OS strings down the line. This Active Perl run in Cygw...
by Gustaaf
07 May 2019 04:14
Forum: DOS Batch Forum
Topic: Here is a Working Progress Bar
Replies: 0
Views: 20901

Here is a Working Progress Bar

Hi there, I thought I would share my DOS progress bar I have been quietly working on over the years. It processes text files containing PC names. The idea would be to process commands etc on computers etc as needed. The script is written in a DEMO fashion where it creates its OWN PC lists etc, and p...