Results 1 to 2 of 2
  1. #1

    Thread Starter
    Join Date
    Feb 2006

    [VB6] Utility: Pulsar Search & Replace


    Pulsar is a small utility program for bulk search and replace on VB6 Project folders.

    Description and Features

    You give it a list of search and replace strings, a list of files to process, and it runs through the files repeating the search and replace list against the files list. The original files can optionally be renamed with a backup prefix, and the processed files can optionally be renamed using a seach and replace string pair.

    Files before:
    Files after:
    sv-FredMain.bas SuperMain.bas
    sv-FredMDI.frm  SuperMDI.frm
    sv-FredMDI.frx  SuperMDI.frx
    sv-FredDoc.frm  SuperDoc.frm
    sv-FredDoc.frx  SuperDoc.frx
    sv-Fred.vbp     Super.vbp
    This is useful when you have built a Project and partway through you find you want to rename the Project itself and occurrences of the name in the program, or anytime you need to make such changes all over within your multi-module Project.

    The replace specs and the log of the last run are retained in a "Pulsar specs" file you can use again if required.

    Like the VB6 IDE's Replace operation Pulsar can search and replace on Whole Words or Anywhere but it also has options to replace Prefixes or Suffixes. This gives you a little more flexibility.

    Non-replaceable files (.frx, .res, binary files in general, etc.) can be included in the files list so they get backed up or renamed, but they can be de-selected so that Pulsar does not try to do search and replace on them. Pulsar is meant to work on ANSI files (like VB6 .frm, .vbp, etc.) and Unicode text files are not supported.


    There may well be bugs in the backup/renaming logic yet. It is safest to create a copy of your whole Project folder and operate on that right now. This may save you a lot of grief if (a.) your find and replace operations didn't do what you want, (b.) the changes are not easily reversible, and (c.) the backup process failed to work entirely correctly.


    Bob Riemersma

    System Requirements

    Windows XP or later. No special hardware or Edition required. VB6 required to compile this utility. No EXE provided in this initial 1.0 release.

    License Info

    Copyright 2011, Robert Riemersma

    Licensed under terms of the Code Project Open License (CPOL) 1.02.

    Sample Log

    Here I did a run against the Pulsar source folder, backing files up with the prefix "BK$" and renaming any file name parts of "Pulsar" to "Fudd" along the way. The replace string specs also change all whole words and prefixes of "Pulsar" to "Fudd" making my new Fudd program source.

    Last run: Tuesday, May 24, 2011 at 12:13:36 AM
    File:   D:\Pulsar\AppEx.cls
    Backup: D:\Pulsar\BK$AppEx.cls
    New:    D:\Pulsar\AppEx.cls
            0 replacements made.
    File:   D:\Pulsar\EscapedStrings.bas
    Backup: D:\Pulsar\BK$EscapedStrings.bas
    New:    D:\Pulsar\EscapedStrings.bas
            0 replacements made.
    File:   D:\Pulsar\FontWiz.cls
    Backup: D:\Pulsar\BK$FontWiz.cls
    New:    D:\Pulsar\FontWiz.cls
            0 replacements made.
    File:   D:\Pulsar\Pulsar.RES
    Backup: D:\Pulsar\BK$Pulsar.RES
    New:    D:\Pulsar\Fudd.RES
            Not selected, no replacments attempted.
    File:   D:\Pulsar\Pulsar.vbp
    Backup: D:\Pulsar\BK$Pulsar.vbp
    New:    D:\Pulsar\Fudd.vbp
            16 replacements made.
    File:   D:\Pulsar\Pulsar.vbw
    Backup: D:\Pulsar\BK$Pulsar.vbw
    New:    D:\Pulsar\Fudd.vbw
            Not selected, no replacments attempted.
    File:   D:\Pulsar\PulsarFiles.frm
    Backup: D:\Pulsar\BK$PulsarFiles.frm
    New:    D:\Pulsar\FuddFiles.frm
            15 replacements made.
    File:   D:\Pulsar\PulsarFiles.frx
    Backup: D:\Pulsar\BK$PulsarFiles.frx
    New:    D:\Pulsar\FuddFiles.frx
            Not selected, no replacments attempted.
    File:   D:\Pulsar\PulsarHelp.frm
    Backup: D:\Pulsar\BK$PulsarHelp.frm
    New:    D:\Pulsar\FuddHelp.frm
            6 replacements made.
    File:   D:\Pulsar\PulsarHelp.frx
    Backup: D:\Pulsar\BK$PulsarHelp.frx
    New:    D:\Pulsar\FuddHelp.frx
            Not selected, no replacments attempted.
    File:   D:\Pulsar\PulsarMain.bas
    Backup: D:\Pulsar\BK$PulsarMain.bas
    New:    D:\Pulsar\FuddMain.bas
            2 replacements made.
    File:   D:\Pulsar\PulsarMDI.frm
    Backup: D:\Pulsar\BK$PulsarMDI.frm
    New:    D:\Pulsar\FuddMDI.frm
            38 replacements made.
    File:   D:\Pulsar\PulsarMDI.frx
    Backup: D:\Pulsar\BK$PulsarMDI.frx
    New:    D:\Pulsar\FuddMDI.frx
            Not selected, no replacments attempted.
    File:   D:\Pulsar\PulsarRun.frm
    Backup: D:\Pulsar\BK$PulsarRun.frm
    New:    D:\Pulsar\FuddRun.frm
            13 replacements made.
    File:   D:\Pulsar\PulsarRun.frx
    Backup: D:\Pulsar\BK$PulsarRun.frx
    New:    D:\Pulsar\FuddRun.frx
            Not selected, no replacments attempted.
    File:   D:\Pulsar\PulsarSpecs.frm
    Backup: D:\Pulsar\BK$PulsarSpecs.frm
    New:    D:\Pulsar\FuddSpecs.frm
            7 replacements made.
    File:   D:\Pulsar\PulsarSpecs.frx
    Backup: D:\Pulsar\BK$PulsarSpecs.frx
    New:    D:\Pulsar\FuddSpecs.frx
            Not selected, no replacments attempted.
    File:   D:\Pulsar\PulsarStrings.frm
    Backup: D:\Pulsar\BK$PulsarStrings.frm
    New:    D:\Pulsar\FuddStrings.frm
            8 replacements made.
    File:   D:\Pulsar\PulsarStrings.frx
    Backup: D:\Pulsar\BK$PulsarStrings.frx
    New:    D:\Pulsar\FuddStrings.frx
            Not selected, no replacments attempted.
    File:   D:\Pulsar\readme.txt
    Backup: D:\Pulsar\BK$readme.txt
    New:    D:\Pulsar\readme.txt
            0 replacements made.
    File:   D:\Pulsar\RTBEx.bas
    Backup: D:\Pulsar\BK$RTBEx.bas
    New:    D:\Pulsar\RTBEx.bas
            0 replacements made.
    Attached Images Attached Images  
    Last edited by dilettante; May 30th, 2011 at 04:43 AM. Reason: Removed attached Project archive, serious bug

  2. #2

    Thread Starter
    Join Date
    Feb 2006

    Re: [VB6] Utility: Pulsar Search & Replace

    Version 1.1

    No change in operation or function except to correct a very serious bug.

    Using Pulsar more myself is pointing to some useful enhancements worth having though!
    Attached Files Attached Files
    Last edited by dilettante; May 30th, 2011 at 05:55 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


Click Here to Expand Forum to Full Width