Q:

File copy and renaming

I want to copy below files from one location to another.
After copy file I want to add something in file name.
From C:\Users\Niki\Desktop*.csv
To C:\Users\Niki\reports\Final_*.csv
How would I do that?
I am using below command for this:
copy /-y "C:\Users\Niki\Desktop\*.csv" "%TargetFolder%"

A:

Here's a batch file that should work:
@echo off
set "targetfolder=d:\backup"
for %%a in ("C:\Users\Niki\Desktop\*.csv") do (
copy /-y "%%a" "%TargetFolder%\Final_%%~nxa"
)

