


Option Explicit Dim StdIn: Set StdIn = WScript.StdInĭim fso: Set fso = CreateObject( " Scripting.FileSystemObject")ĭim FilesRenamed: FilesRenamed = 0 Dim FilesSkipped: FilesSkipped = 0 The command line syntax to run the script is as follows: If the pattern is found, it is replaced by the new string and extension that was provided. It searches for string and extension patterns in each file. This script iterates through all the files found in a particular folder. This allows you to create and alter existing files. This object is used to access a computer's file system. This scripts uses the Scripting.FileSystemObject COM object. I wrote this script to allow me to facilitate the batch renaming of files.

For example, I like to use the extension TAB instead of SQL for table scripts. When I extract tables and stored procedures, I usually create many files which could have a particular pattern and extension that needs to be changed. I usually come across these scenarios when I script out the objects from a database to text files. The files can have a particular string pattern which I would like to remove and/or an extension I want to change. I usually have the need to rename several files located on a particular folder.
