Avatar of tmigs
tmigs
 asked on

.bat file needed

I need a .bat file that will move file9s) based on date modified from one folder to another and then delete older file(s) in the destination folder, i.e.:

move from F:\epic\epic_daily\backups\"filename.bak"(based on most recent date modified) to
Y:\...\...\...

once complete I would like to automatically delete the older file(s) in the folder on Y:\
Microsoft DevelopmentMicrosoft Legacy OS

Avatar of undefined
Last Comment
tmigs

8/22/2022 - Mon
Ken Butters

This is not a .bat file... but it will do what you are asking.

It is free for personal use.... otherwise I believe there is a fee for business use.

http://allwaysync.com/

I recently recommended this in another experts-exchange question... and the author really liked it after he tried it.
hafeezmca

Hi,
Try to use Microsoft Synctoy 2.0 which will do the task that you are looking out for instead of creating batch file.
You can configure it to copy files from target to destination and keep or delete the files from the target.
ASKER CERTIFIED SOLUTION
Francois_IT

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
tmigs

ASKER
Thanks. This is exactly what I was looking for.

Thanks for the other responses but Robocopy is what the Dr. ordered.
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