How to make a batch file copy itself?

Batch file to copy files to flash drive?

  • hi i was wondering if there was some command or a batch file i could make for my flash drive.i want to be able to put in my flash drive and open a batch file that will copy stuff from my documents to my flash drive (g:) any one know ?

  • Answer:

    REM Copied "My Document" from current profile to location the batch file is excuted from @Echo Off XCOPY "%userprofile%\My Documents" "%~d0\My Documents" /I /E /Y Pause>nul Exit Add /Q to the XCopy command if you want to hide the file names while copying. This script works off the current directory the batch file is ran from. EX. If ran from the C:\ then the files will be copied there.

trp_waka... at Yahoo! Answers Visit the source

Was this solution helpful to you?

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.