Copy folder-files from one location to another including Date-Time stamp?

techresearch7777777 1,301 Reputation points

Hello, can someone provide me a .bat batch script that I can run that will copy all the contents (files and subfolders) from one local folder to another different location and includes Date-Time stamp to the Hour & Minutes?

i.e. copy "C:\Backups" to different location "\SharedDifferentDisk\Backups_20210330_1500"

And then when I run it again like 15 minutes later the next time it will create another new destination folder like "\SharedDifferentDisk\Backups_20210330_1515"

Any type of free built in copy like xcopy or robocopy or something else is good.

Thanks in advance.

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
8,252 questions
No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Dave Patrick 330.7K Reputation points Microsoft MVP

    You could use PowerShell to copy the items.

    --please don't forget to Accept as answer if the reply is helpful--

    No comments

  2. Sunny Qi 10,656 Reputation points


    Thanks for posting in Q&A platform.

    Here are some similar thread talking about copying folder to new location with timestamp, you could have a look:

    How to copy folder to new location and give it a timestamp

    Copy the file from one folder to the other and add a time stamp as a suffix when copying batch script

    How to copy an entire folder with current date/time in destination folder name?
    Please Note: Since the websites are not hosted by Microsoft, the links may change without notice. Microsoft does not guarantee the accuracy of this information.

    Best Regards,


    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    No comments