Tuesday, June 9, 2015

I want to rename the bulk files and folders at single time,how I can do this with batch scripting

I want to rename the bulk files and folders at single time,how I can do this with batch scripting



I have the code for only to change either file or folder,not both



@echo off
SETLOCAL ENABLEDELAYEDEXPANSION

SET old=newdocV9
SET new=newdocV10
for /f "tokens=*" %%f in ('dir /b *.*') do (
SET newname=%%f
SET newname=!newname:%old%=%new%!
move "%%f" "!newname!"
)


I am looking for the code to rename the files and folders at a single time using batch script

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...