Jump to content

Recommended Posts

Posted

Can someone explain the details of the following script to me?

set test=%1

ren %1 APP_PROD_ABC_%test:~13%

Mostly I'm curious what the ":~13% is doing. (yes I'm pretty new at this)

Thanks.


Posted

The script takes a file/folder as a parameter %1

e.g. C:\APath\ADir\AFilename.ext

It takes this parameter and sets it as a variable set test=%1

set test=C:\APath\ADir\AFilename.ext

Then it performs a rename operation using the last 13 characters of the %test% variable. ren %1 APP_PROD_ABC_%test:~13%

ren C:\APath\ADir\AFilename.ext APP_PROD_ABC_AFilename.ext

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