Avatar of Fordraiders
Fordraiders
Flag for United States of America asked on

Batch File to Rename a file

need a batch file line to  "Rename" a file instead of deleting it on the laptop..



for %%a in  (C) do del "%%a":\Data2013.xlam /s /f

I need this file to get renamed from

"Data2013.xlam"  to   "Current_Data2013.xlam"



Thanks
fordraiders
ProgrammingSystem ProgrammingProgramming Languages-Other

Avatar of undefined
Last Comment
Fordraiders

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
TommySzalapski

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
5teveo

for %%a in (*.xlam) do ren "%%a" "Current_%%a"
SOLUTION
Tomislavj

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Fordraiders

ASKER
Thanks
Fordraiders

ASKER
i get an error now on:

for %%a in  (C) do ren "%%a":\Data2013.xlam "%%a":\Current_Data2013.xlam /s /f

not correct syntax ?
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck