Jump to content

Recommended Posts

Posted

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...


Posted

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=!")

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

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