Jump to content

REQ: batch renamer


Recommended Posts

i suck at loops
can someone make me a cmd/bat script that would rename bunch of these:

Windows6.1-KB2511455-x64.msu

to simply KB2511455-x64.msu

i have 160 of these (all different number) and its nightmare to do manual renaming...

Link to comment
Share on other sites


Something simple like this may work for you.

@Echo Off & SetLocal EnableDelayedExpansion
For %%A In (*.msu) Do (Set "_=%%A"
    If "%%A" NEq "!_:*-KB=!" Ren "%%A" "KB!_:*-KB=!")
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...