kodyleonard Posted December 28, 2007 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.
Yzöwl Posted December 29, 2007 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
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now