Copy last modified files from network path into SQL server box and rename them using Agent job
0
votes
2
answers
792
views
I have to copy latest backup from a network path and bring that to my SQL server physical drive for restore, I have to do that using agent job.
This is what i am doing.
Created a SQL server agent job
1) XCOPY source *.bak /Y destination
2) Ren *bak mydbbackup.bak
Questions:
*What mistake am i doing here ?*
*Are there any xcopy **/**commands which can copy the latest files only and ignore old files ?
Is there a way i can do that using another SQLCMD command besides creating a stored procedure*
Thanks,
learner
Asked by datalearner
(11 rep)
Jan 6, 2020, 06:40 PM
Last activity: Mar 1, 2025, 06:00 PM
Last activity: Mar 1, 2025, 06:00 PM