|Hi any body there|
i am trying to move csv files from one folder to other. while moving i want to rename the files. i am using below code.
@echo off & setLocal EnableDelayedExpansion
set /A limit+=1
FOR %%i IN (C:\Users\sneha\Desktop\julyFolder\*.xlsx) DO (
set /A N+=1
@For /F "tokens=1,2,3,4 delims=/ " %%A in ('Date /t') do @(
@For /F "tokens=1,2,3 delims=:,. " %%A in ('echo %time%') do @(
move "%%i" C:\Users\sneha\Desktop\desti\sneha_%All%%Allm%.xlsx
if !N! geq %limit% GOTO :LOOP
it is working fine but it is not appending the 1st file name. For example if i am having 5 files in source n i run the above batch file thn leaving the first file i m getting all other 4 files in destination with current date n time. what should i do so that i can have the first file with current date and time.