T
T
Tenebrius2016-09-09 12:14:48
Windows
Tenebrius, 2016-09-09 12:14:48

How to rename a large number of files according to a template?

There are a large number (several thousand) of files with a name like "file-xy", where x and y are numbers. You need to rename all files in such a way that the first digit in the name increases by 30, and the second by 40.
For example: "file-24-64" -> "file-54-104"
How can this be done. Ideally, if by built-in means, for example, through the console.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey Osipov, 2016-09-09
@tion

It may seem strange, but I recommend installing Total Commander. Run it, select the files that need to be renamed, specify the renaming rules and click Run.
Or yes, PowerShell to the rescue.

T
toastername, 2016-09-09
@tostername

A simple, convenient and very flexible tool for any bulk renames - ReNamer

E
Eugene, 2016-09-09
@yellowmew

gci file-* | %{$t=($_.Name -split '-');Ren $_.fullname -NewName ($t[0]+'-'+[string]([int]$t[1]+30)+'-'+[string]([int]$t[2]+40))}

how lazy everyone is, they can’t write such a simple script :D

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question