How to make a batch file copy itself?

Need help making MS-DOS Batch File?

  • I would like to know how or if its possible to make a batch file to copy for me. I have to back up a folder daily to a USB. Say i want to back up c:\program files\adobe\folder1 into i:\folder2 Is it possible to make an MS-DOS icon to do that for me i can carry around on my USB? Doing it 5 or 6 time a day can be very annoying... Thanks

  • Answer:

    yes it is possible... copy the following code and save it to your desktop as "BackUp.bat"... @echo off xcopy "c:\program files\adobe\folder1" "i:\folder2\" /e just change the name of the folder you want to "copy from" and to "copy to".... hope this helps....

james c at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

xcopy /e /v c:\folder2 c:\folder3 pause exit Copy/ past everything above this text to notepad then save as .bat file ex. filename.bat c:\folder2 c:\folder3 <--- 1st is source folder name & 2nd is destination folder name. Change drive letters accordingly also

Kamikaziebunny

@echo off title Backup script color 17 echo Backup in progress. Please wait... copy "C:\Program Files\Adobe\folder1\" "I:\folder2\" echo Backup completed. pause This will copy the contents of folder 1 into folder 2.

Subsentient

In a batch file type @echo off Copy c\programfiles\Adobe\folder1 i:\folder2 Without hitting enter. So it should look like @echo off Copy blablabla Save this as backup.bat

wyatt evans

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.