renfiles – rename files command line tool for Windows

This is a simple tool that can help you rename multiple files with a command line pipe. It can also be used to rename a single file. The code used is not particularly optimized, but I am still learning to write in C#. The code can be compiled on any Windows that has the .NET Framework installed.

How to compile

Just open a Windows command prompt and specify the path to your csc.exe. For example:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe /t:exe renfiles.cs

Usage

Parameters

-h, –help              Print this help
-s, –search           Search string
-r, –replace          Replace string

Optional

-f, –file          Path to single file

Sample commands

dir /b /s | renfiles -s "search_string" -r "replace_string"
renfiles -s "search_string" -r "replace_string" -f "path_to_file"
cat list_files.txt | renfiles -s "search_string" -r "replace_string"

Download: https://github.com/bained/renfiles

Video tutorial

renfiles – rename multiple files with command line pipe

Share and Enjoy !

Shares

Leave a Reply

Your email address will not be published. Required fields are marked *

*