How to strip first 3 characters off filename in batch file -


I have some files that I want to strip 3 characters before the file name I thought it would work, But it only outputs:

  MiSXPRF.Txt ECHO is off ECO is off %% for %%% (% MIS * .tmt)   Close 
  @echo (set old name = %% a SET newName =% oldName: ~ 3% echo% Echo% oldName% echo% newName%) pause   

Note: I am then amending the REN% aa% newName Pragya, but I want to make sure that the name is already correct.

You must use a delayed extension to use the variable set in the loop.

Try this revised version instead

  @echo offset Settlelock Enable %% a in (MIS * .tmt) for expansion (old name set Can not have a location in between ==% set newName =  set  and  =  old name: ~ 3! Echo! New name!). >  

In addition, they should be included.

Comments

Popular posts from this blog

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -