kodyleonard Posted December 28, 2007 Share Posted December 28, 2007 Can someone explain the details of the following script to me?set test=%1ren %1 APP_PROD_ABC_%test:~13%Mostly I'm curious what the ":~13% is doing. (yes I'm pretty new at this)Thanks. Link to comment Share on other sites More sharing options...
Yzöwl Posted December 29, 2007 Share Posted December 29, 2007 The script takes a file/folder as a parameter %1e.g. C:\APath\ADir\AFilename.extIt takes this parameter and sets it as a variable set test=%1set test=C:\APath\ADir\AFilename.extThen 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now