How to copy data from USB/PenDrive automatically when the USB is inserted?



Sometimes you might have thought about copying data from a USB/ PenDrive to your computer automatically just when the device is inserted into your computer. Today, we will be discussing on how you can do so.

Things Required: 

A computer with Windows installed, Little Knowledge of MS-DOS Commands.

How to do?

Step 1. Open "Command Prompt" on your computer. Just click on Start menu and type CMD in the 'Search' and press Enter.
Step 2. Type "copy con autocopy.bat" (remove the quotes " ") in the Command Prompt window and press Enter.
Step 3. Type "xcopy i: F:\usbcopy /h /s /c /q /i"  (remove the quotes " ") and press Enter.
Step 4. Type "Exit"  (remove the quotes " ") and press Enter.
Step 5. Press F6.
Step 6. Now it will create a batch file named autocopy.bat

Here,
xcopy is a MS-DOS command which is used to copy files or folders.
i: is the drive letter of the USB/Pendrive (Replace it with the drive name for USB on your Computer)
F:\usbcopy is the location where you want to copy the USB's data. (Replace it with the directory/folder where you want to copy the USB's data on your computer)
 /h is used to copy the hidden files from the pendrive.

Now, copy the 'autocopy.bat' file and paste it anywhere you want. When someone inserts his/her USB into your computer, open 'autocopy.bat' file. It will automatically copy the data to your computer.
Note: The data in the USB/PenDrive will be copied to F:\usbcopy in my case.





Share on Google Plus

About Binit Ghimire

I am a 16-year old Student, YouTuber, Web Designer and Blogger from Nepal. I am the administrator of this blog and 4-5 other blogs. Hope You Like the Contents of this Blog!

0 comments:

Post a Comment

Write Your Comments!