We are going to create a batch file that backup your drive, Folder, Sub-folder and file data including hidden and empty files.

  • Open Notepad and paste the below code

@echo off

xcopy D:\Eazytrix G:\ /S /E /H /I /C /Y


Red color: Source path (Path where your file is stored)

Orange Colour: Destination path (Path where your backup file will be stored)

The parameters mean:

/S: copy directories and subdirectories, unless they are empty. If you omit “/s”, xcopy will work within a single directory.

/E: copy all subdirectories, even if they are empty.

/H: copy files with hidden and system file attributes.

/I: if in doubt always assume the destination is a folder.

/C: continue copying even if an error occurs.

/Y: suppress prompt to confirm overwriting a file.

@echo off: Turns off the on-screen text display for executed commands

    • Now click on File menu and click Save As...
    • Type file with extension name .bat

    • Now you see a file like this

    • Just open the backup file it will copy all the data from D:\Eazytrix drive and paste it to G drive
    • You can change the Drive letter as per your need.


Here you can Download .bat file. Click here